Joe and Luciano,
I appreciate the info up to this point, I do feel I've gotten a better grasp of what I'm trying to do and how the PIC works, yet I am as confused as ever.
Here's the latest code (not including the tons of modifications I've tried) that appears to do nothing. Joe, I also used the code you presented in the
"Can an asm interrupt contain gosub to a picbasic routine?" forum question which looked related to this subject.
Code:
include "modedefs.bas"
Trisb = %00000000
Trisc = %01000000
Portb = %00000000
Portc = %00000000
PIE1 = %00100001 'Allow Timer1 & serial in to cause a periheral interrupt.
INTCON = %11110000 ' Enable interrupt for Timer0 AND peripherals
RX var byte[40]
TX var byte[40]
i var byte
RCIF VAR PIR1.5
' Alias RCIF (USART Receive Interrupt Flag)
Main:
if RCIF = 1 Then
serin portc.7, T2400, PDA
'I've also tried: "RCREG = PDA" in place of "serin portc.7, T2400, PDA" to
'no avail
else
goto main
endif
goto DataOut
DataOut:
serout portc.6, T2400, [10, 13]
goto Main
I'm still using the Hyper terminal to check this out.
I have looked at the App Notes, the datasheet and the forums and I still cannot get my head around this. I believe I am running into a wall looking at the App Notes and datasheets because they explain EXACTLY how the PIC works with serial comms all the while using assembly, while PicBasic Pro takes care of many of these things yet not all. Do I need to set up interrupts, define registers and the like? Again, I appreciate the help, the info thus far has been great, I'm just not applying it right and I can't figure out why.
Bookmarks