Thanks for the info but now I have other problems. While trying to compile the program in Microstudio using picbasic pro it gives me an error on this line:
Serout portb.2, N9600, [254,1]
I am trying to send this data out to the lcd which is serial. It gives me this error on every line with this command. I am using the code as before with the adjustments made. Here is a snipit of the top of the program, as I am sure this is the problem hopefully
' CONFIGURATION SETUP
' Oscillator: XT
' Watchdog Timer: OFF
' Power up Timer: OFF
' Master Clear Enable: Internal
' Brown Out Detect: OFF
' Code Protect: OFF
' Data EE Read Protect:OFF
'lcd setup
I con 254
CLR con 1
Line1 con 128
line2 con 192
line3 con 148
line4 con 212
DEFINE OSC 4
'variables
HzTimer VAR Word '1/2 second counter (2 Hz)
HH VAR Byte ' Hours 1-12
MM VAR ByTE ' Minutes 0-59
SS VAR Byte ' Seconds 0-59
X VAR Byte ' temp variable
col VAR Bit ' colon 1=on, 0=0ff
'initial conditions of controller
PORTB.0 = 0 'PORTB.0 PIN LOW
TRISB.O = 1 'PORTB.0 PIN input for button
OPTION_REG=%00000111 'weak pullups on, TMRO prescale = ‘256
HzTimer=$7A12 'for 1/2 Sec
HH=0:MM=0:SS=0:col=0 'initial conditions
Pause 1000 'settle Time for Serial LCD
' ************************************************** ************
'SET INITIAL TIME WITH PUSH BUTTON (PART 1 of Program)
Serout portb.2, N9600, [254,1] this and every other one like it give the same error "bad expression". What am I doing wrong? I am trying to compile the program. Thanks




Bookmarks