Excellent help, thanks.
I have now managed to get variables sent from VB to PIC.
The code now looks like this:
Code:
Start:
' Main program loop that make the user happy to
' see a LED flashing to mean that something is
' running
'
Hserout [hours, minutes, seconds]
toggle userled
for delay = 1 to 5000 ' use a loop delay to ensure
pauseus 5 ' getting interrupt as fast as
next ' possible
goto start
disable interrupt
USARTInterrupt:
' Here's the interrupt routine who will make the user
HSERIN [hours, minutes, seconds]
Write 5, hours
Write 6, minutes
Write 7, seconds
resume ' get out of here
enable interrupt
However, i can only send over single numerals, ie 0-9. But in the timing functions for Hrs, Mins and Sec it could be upto 59. How do i get the PIC to reconise the double figures. If i try to send them the PIC just hangs.
The write command is to just store the variables in EEPROM for later use.
Thanks for your help,
Steve
Bookmarks