Won't work... A constant is a numeric value. N2400 may have a numeric value associated with it, but N2400 itself is not a numeric value.
You've got DEBUG defined as PortC.6, and SEROUT going to the same place.
Which one is it?
SEROUT PORTC.6,baud, [#B0=0]
#B0=0? What's that for? The manual doesn't have anything like that in it...
How about some of this:
Code:
include"modedefs.bas"
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
DEFINE OSC 4
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
trisa = $ff : trisc = 0 : b0 var byte : pause 2000
LCDOUT 254 , 1 , " WELCOME MY " , 254 , 192 , 2 , " MONITOR SYSTEM "
pause 3000 : LCDOUT 254 , 1 , " MY STARTING " , 254 , 192 , "TEMP IS: "
TRISA = 255 : TRISC.6 = 0 : TRISD = 0 : TRISA.0 = 1 : B0 VAR BYTE
MAIN: ADCON1 = 3 : ADCIN 0 , B0 : lcdout 254, 201, "<"
if b0 = 0 then lcdout 254, 201, " "
lcdout 254, 202, DEC ( b0 ) , "'C" : serout portc.6, n2400, #b0
pause 5000 : goto main
END
Lots of colons, shorter, easier to read in my mind...yes...Your job to figure out what's different. It's all in the manual.
But the main thing is...
We've got no idea which PIC you're using, which version of PBP, no idea what the problem is that you are having (although I can guess by looking at your code), no idea what your circuit actually looks like...
Bookmarks