Serial pass-through application.
Posted: 04 June 2008, 12:05 PM
Hello all,
I am new to Zbasic and a bit new to microcontrollers in general. I played with the Parallax BS2p stamp long enough to figure out that it probably didn't have the horsepower I needed. After some researching I found the Zbasic microcontrollers and here I am!
In a nutshell, my application is as follows:
A box with two serial ports. It is a pass-through device that sits silently in the middle of a 9600 baud, 8 bit, no parity, 1 stop bit, no handshaking conversation between two existing legacy serial devices. Communications activity between the two devices is relatively low. Maybe one to thirty 4-80 character strings per minute, terminated by CR's. The box will receive ASCII strings from either end, buffer them until a CR is received and then forward them out the other port when it is determined to be idle.
About once a minute, the box will start queueing up any data received on port A and send a special command out port B. It will then (hopefully) receive a reply on port B. It will then send any data queued up from port A to port B, adding a .5 second or so delay after every CR in the buffered data. It will be important that no data is lost between the two ports and that the box's presence is effectively invisible from the perspective of the two legacy devices connected to the two ports. The box will take the information it received via it's request to and reply from port B and after a series of logic decisions, control two reversible gearhead 12VDC motors via relays. The box will also have a small LCD screen and four pushbuttons that will be used to configure various settings in the box. All of these other functions are relatively insensitive to timing issues. There will be a number of other digital inputs and outputs that will interact with the real world but will also be relatively insensitive to timing issues.
I really want to stick to a microcontroller development platform with a higher level language. I have never had joy working with C or assembler on PC platforms in the past. Way too many housekeeping chores and subtle, hard to squash bugs to track down for my taste.
My questions are as follows:
1. Would the ZX-24P and its two hardware serial ports be a good choice for this application?
2. Would it be fast enough to not ever lose any of the serial data?
3. Would the Zbasic interrupt and multitasking capabilities, etc. make it a better choice for this application than any of the other high level language microcontroller platforms out there?
4. What problems would you anticipate?
5. Would the ZX-24n be required to get the performance needed?
6. Would anyone have any code samples that might be appropriate for this application and would they be willing to share them?
Thanks in advance for any and all replies,
-Christopher Erickson
I am new to Zbasic and a bit new to microcontrollers in general. I played with the Parallax BS2p stamp long enough to figure out that it probably didn't have the horsepower I needed. After some researching I found the Zbasic microcontrollers and here I am!
In a nutshell, my application is as follows:
A box with two serial ports. It is a pass-through device that sits silently in the middle of a 9600 baud, 8 bit, no parity, 1 stop bit, no handshaking conversation between two existing legacy serial devices. Communications activity between the two devices is relatively low. Maybe one to thirty 4-80 character strings per minute, terminated by CR's. The box will receive ASCII strings from either end, buffer them until a CR is received and then forward them out the other port when it is determined to be idle.
About once a minute, the box will start queueing up any data received on port A and send a special command out port B. It will then (hopefully) receive a reply on port B. It will then send any data queued up from port A to port B, adding a .5 second or so delay after every CR in the buffered data. It will be important that no data is lost between the two ports and that the box's presence is effectively invisible from the perspective of the two legacy devices connected to the two ports. The box will take the information it received via it's request to and reply from port B and after a series of logic decisions, control two reversible gearhead 12VDC motors via relays. The box will also have a small LCD screen and four pushbuttons that will be used to configure various settings in the box. All of these other functions are relatively insensitive to timing issues. There will be a number of other digital inputs and outputs that will interact with the real world but will also be relatively insensitive to timing issues.
I really want to stick to a microcontroller development platform with a higher level language. I have never had joy working with C or assembler on PC platforms in the past. Way too many housekeeping chores and subtle, hard to squash bugs to track down for my taste.
My questions are as follows:
1. Would the ZX-24P and its two hardware serial ports be a good choice for this application?
2. Would it be fast enough to not ever lose any of the serial data?
3. Would the Zbasic interrupt and multitasking capabilities, etc. make it a better choice for this application than any of the other high level language microcontroller platforms out there?
4. What problems would you anticipate?
5. Would the ZX-24n be required to get the performance needed?
6. Would anyone have any code samples that might be appropriate for this application and would they be willing to share them?
Thanks in advance for any and all replies,
-Christopher Erickson