Got a minute to play tonight. I added routines to allow the user to indicate that the next instruction will be a command rather than data. The user will send 0x80 ( unused by the character set ). This sets a flag Flag,isInstruction. The next instruction can be any command other than a read ( to read busy flag or DDRAM/CGRAM ). I don't really need that at this point.
I'm obviously still learning. There were a number of pesky bugs. I miss function scope and encapsulation!!!
I wired up the RS232 converter. Next, I'll get the pic to wait endlessly for a byte. When it receives one, it will process it and write to the LCD. Timing will be interesting. With the need to poll the busy flag of the LCD, I can't be certain how long an operation will take. I'm thinking that the read from USART needs to write to a buffer and signal the source if it gets full. I'll need some kind of ready to receive/buffer full protocol. My compiler tends to create lines of up to 8 instructions. Line by line might be the way to go. Not the fastest, but it is controllable.
Looks like another foot or two of snow. Work may even be cancelled. That will provide some time to do more tomorrow ( power lines permitting ). Cabin fever kids may be a challenge, too.
Phrase of the day: Silence is golden, duct tape is silver.
No comments:
Post a Comment