I'm now working on sending serial data from our bluesmirf through the pic straight into the serial input port of our LCD. One of my partners currently is working on his java program and has the pic at home so I can't test the code that I have till tomorrow afternoon, but the code I wrote compiles fine and uses a similar format to the code that skimask showed me (baring the backlight activation part).
@ DEVICE MCLR_OFF, PROTECT_OFF, WDT_OFF
INCLUDE "modedefs.bas"
DEFINE LCD_LINES 2
ANSEL = %00000000
SERIALDATA var byte
STORAGE VAR BYTE
MAIN:
SEROUT PORTB.0,T9600,[STORAGE]
SEARCHLOOP:
SERIN PORTA.0,T9600,[SERIALDATA]
if SERIALDATA <> "A" then goto SEARCHLOOP
SERIN PORTA.0,T9600,STORAGE: SEROUT PORTB.0,T9600,[STORAGE]
GOTO MAIN
I'm not sure if SERIN, and SEROUT work this way, but what I understand from what I've read and seen is that the serin command will put it's data in the variable byte "STORAGE" that I created and then the SEROUT will send out the serial data that is stored in that variable byte. Does the code look good? Or am I a bit off on my logic. Also I'm not fully sure what the first line does, but I saw it on another project doing serial communication with a PIC16F88 and what I do know about those commands it seems to make sense, it also hasn't hurt anythign I've done so far.
PS:
Skimask your smart "S-M-R-T....... I mean S-M-A-R-T" thanks a lot for your help so far.
Bookmarks