Hello!
I'm trying to connect to my PIC via a interupt on receivd rs232. The hardware is connected as attachment "Hardware Setup.jpg" (MicroCodeLoader).
My problem is when I try to connect nothing happends.
Here is my code:
<PBP COD>
DEFINE LOADER_USED 1
' Set X-tal to 4 MHz
DEFINE OSC 4
DEFINE HSER_RCSTA 90h 'Hser receive status init
DEFINE HSER_TXSTA 20h 'Hser transmit status init
DEFINE HSER_BAUD 2400 'Hser baud rate
---
SPBRG = 25'103 'SET TO 2400bps
On Interrupt Goto myint ' Define interrupt handler
INTCON = $C0 ' Enable INTE interrupt
PIE1.5 = 1
---
' Interrupt handler
Disable ' No interrupts past this point
myint:
PIR1.5 = 0
lcdout $FE, LcdLine2, " Connected "
pause 1000
Resume ' Return to main program
Enable
end
</PBP COD>
Whats wrong? I can't get it to work!
Pleas help me.
Regards
Håkan
( I hope you can understand my por english and code)
Bookmarks