Search found 10 matches

by Blue Bill
Mon Jun 03, 2013 3:24 pm
Forum: Compiler
Topic: Why doesn't "If INTCON.1 and intcon.4 Then" compil
Replies: 2
Views: 2180

Thanks David, I thought I tried that but guess I didn't

Funny it doesn't automatically capitalize ".booleans(x)" with the current Si version.

PS fantastic compiler. I'll have to take a look at Firewing
by Blue Bill
Mon Jun 03, 2013 2:29 pm
Forum: Compiler
Topic: Why doesn't "If INTCON.1 and intcon.4 Then" compil
Replies: 2
Views: 2180

Why doesn't "If INTCON.1 and intcon.4 Then" compil

Code: Select all

If INTCON.1 and INTCON.4 Then
gives me a
Boolean expression expected. I'm sure it's something simple I'm overlooking.
by Blue Bill
Sun Jun 02, 2013 4:36 am
Forum: General
Topic: Interrupt based software UART TX beta
Replies: 0
Views: 5303

Interrupt based software UART TX beta

Just hammering out some code and getting back into PIC programming. I'm working on a buffered IRQ & TIMER driven software UART that doesn't tie up the CPU with delays. It's a first draft but seems to work and is currently only a single character. I'll post more code as I complete the full TX/RX rout...
by Blue Bill
Wed May 29, 2013 1:54 pm
Forum: Compiler
Topic: Is there a more elegant way to set high & low bytes?
Replies: 1
Views: 1928

Is there a more elegant way to set high & low bytes?

Code: Select all

Clock = 8		   
#option SetBaud1 = 38400
#option MIPx10 = _clock * 2500000 
Const Baud1 As Word = (MIPx10 / SetBaud1 - 5) / 10                                
TBLPTRH = Baud1 >> 8 And $FF
TBLPTRL = Baud1 And $FF
The ".Byte0" and ".Bytes(0)" don't compile, are they part of a module?
by Blue Bill
Wed May 29, 2013 4:33 am
Forum: Compiler
Topic: windows 7 64bit usb key issues
Replies: 5
Views: 3405

Are there limitations to how many times it can be installed? Edit: ahh three. The new system allows you to install on up to three machines. If you need to reset a machine (because you change it or the hard drive fails) just email me and I will reset it for you. I will get around to having the system...
by Blue Bill
Wed May 29, 2013 2:26 am
Forum: Compiler
Topic: Any idea why this code doesn't work as a 16 bit ring buffer?
Replies: 5
Views: 2997

The full version fixed it. Thanks again.
by Blue Bill
Tue May 28, 2013 11:11 pm
Forum: Compiler
Topic: Sending PORT bits to subroutine or function?
Replies: 2
Views: 2277

Wow, thank you. Swordfish BASIC is just full of surprises.
by Blue Bill
Tue May 28, 2013 3:01 pm
Forum: Compiler
Topic: Sending PORT bits to subroutine or function?
Replies: 2
Views: 2277

Sending PORT bits to subroutine or function?

Questions, 1. This code doesn't work, I'm not sure how to pass a bit (it's a port) to a subroutine or function. 2. Can the RelayDown variable be used to manipulate the public variable that called it or do I have to make this a function? sub Relay(PortBit as boolean, RelayDown as byte) If RelayDown=0...
by Blue Bill
Tue May 28, 2013 2:51 pm
Forum: Compiler
Topic: Any idea why this code doesn't work as a 16 bit ring buffer?
Replies: 5
Views: 2997

Thank you, thought I was seeing things :D

I think I have an old copy of Swordfish with the USB key, apparently it can be upgraded to the Si version.
by Blue Bill
Mon May 27, 2013 5:05 pm
Forum: Compiler
Topic: Any idea why this code doesn't work as a 16 bit ring buffer?
Replies: 5
Views: 2997

Any idea why this code doesn't work as a 16 bit ring buffer?

StatOverflow As bit
StatusFlash As word

Code: Select all

		StatOverflow = StatusFlash.15
		StatusFlash = Word(StatusFlash << 1)
		StatusFlash.0 = StatOverflow
The bits are somewhat wonky.