Need a sanity check: SX48 + 115200 baud + LCD + PS/2 keyboard
I'm needing a bit of a sanity check. I have an industrial opportunity to build rather than buy.
The device will monitor sporadic bi-directional serial traffic at up to 115,200 baud, manage a small (e.g., 2x20) LCD, and take user input from both a PS/2 keyboard and a couple of pushbuttons. Upon pushbutton input, the device will need to insert a 16 to 64 byte string (of user entered data) into one of the serial lines.
I'd like to use SX/B.
It would be nice to use the SX48 protoboard with the 50 MHz oscillator and an added on-board serial buffer chip.
I lack sufficient experience this particular realm to go out on the limb by myself, and so I thought I would ask "Is it doable; what am I forgetting to consider?"
Daniel
The device will monitor sporadic bi-directional serial traffic at up to 115,200 baud, manage a small (e.g., 2x20) LCD, and take user input from both a PS/2 keyboard and a couple of pushbuttons. Upon pushbutton input, the device will need to insert a 16 to 64 byte string (of user entered data) into one of the serial lines.
I'd like to use SX/B.
It would be nice to use the SX48 protoboard with the 50 MHz oscillator and an added on-board serial buffer chip.
I lack sufficient experience this particular realm to go out on the limb by myself, and so I thought I would ask "Is it doable; what am I forgetting to consider?"
Daniel
Comments
You may also want to consider the Propeller chip as it already has driver support for PS/2 keyboard, mouse, NTSC video and VGA.
The remaining items (LCD, 115200 baud and pushbuttons) should be do-able on the SX-28.
Good luck.
Sure, I have done button input, PS/2 keyboard input, LCD output and 115200 serial bidirectional comms. Also, these can all be operated simultaneously in assembler ..... not in SX/B (I believe, as SX/B is not multi-tasking).
So it's do-able but quite a bit of work to get it all right and rock-solid. To keep the timings and interactions simple, you will want to use an RTOS of some sort; a simple scheduler will do.
I make products similar to this commercially, so I know its possible.
I can guide you to a degree, but as I'm in this game on a commercial basis, you'll have to do the work yourself.
Alternately, we can do a commercial arrangement with you.
Cheers,
Peter (pjv)
Do you have public example of UARTs using your scheduler technique? I'd like to try it in SX/B.
Sure, I'll dig out an appropriate one and post it.
The main issue (I have) with SX/B is when it sits and waits for a time-out. Such as the pause function when receiving or sending serial data. Instead, if such pauses would simply return to the scheduler which then would dispatch the next task, you would then have a simple co-operative RTOS. That then wil permit numerous tasks to operate "simultaneously".
I have done quite a bit more work on that front (eventhough there appeared to be minimal interest from the forum) to push this forward. Hopefully soon I can be ready to properly approach Terry (and others as appropriate) to investigate the changes required to SX/B for implementation of this concept. And hopefully we can get this implemented.
I really think it not that onerous, and would have a tremendous benefit.
More later.
Cheers,
Peter (pjv)
Post Edited (JonnyMac) : 2/7/2007 2:17:46 AM GMT
Earlier this month I promised to dig out a UART running under my simple scheduler. Well, finally I got time to do that and tweak it a bit so it can be quite simply modified.
The formatting on the code display in this window gets all screwed up, so for easier reading, download the attached file.
The sample uses state machines to send at string of data at 9600 baud.... a non- ASCII counter twice as well as carriage retrurn and line feed.
Simultaneously it can (have not tested) also receive data at 9600.
This is not the only (or best) way to tackle the UART, just one chosen to show how it interacts with the scheduler.
Cheers,
Peter (pjv)