What do you think it would take to ......
Group:
I have used the SX or the SX/B tools but i have a project i want to do.
I am going to send rs-232 messages from a pc to the micro and the micro is going to reformat the message and send it by i2c to a chip. Any response will be formatted for the return rs-232 message and sent to the pc.
I would like the serial rs-232 buffered in case the pc wants to change the order before the micro is done with the i2c. The i2c does not have to be buffed and it need only be a master.
In general this would be a frame work for a set of devices that are command over re-232, format the meaasge for another interface, do the transaction, and return a formated response to the rs-232 host.
I even thought to start with some code posted that did interrupt driven, buffered rs-232 in asm and then do the rest in sx basic.
What do you with experience think it would take me to do this, not having used the sx or the sx tools before.
cheers,
rich
BTW i do have and engineering background.
I have used the SX or the SX/B tools but i have a project i want to do.
I am going to send rs-232 messages from a pc to the micro and the micro is going to reformat the message and send it by i2c to a chip. Any response will be formatted for the return rs-232 message and sent to the pc.
I would like the serial rs-232 buffered in case the pc wants to change the order before the micro is done with the i2c. The i2c does not have to be buffed and it need only be a master.
In general this would be a frame work for a set of devices that are command over re-232, format the meaasge for another interface, do the transaction, and return a formated response to the rs-232 host.
I even thought to start with some code posted that did interrupt driven, buffered rs-232 in asm and then do the rest in sx basic.
What do you with experience think it would take me to do this, not having used the sx or the sx tools before.
cheers,
rich
BTW i do have and engineering background.
Comments
rich
For what I have done in a similar situation, you could utilize the CTS & RTS signal lines between the PC and the SX chip. Using these signal lines helps the SX to control when the RS232 buffer from the PC will be sent to the SX. When the PC wishes to transmit data to the SX, the RTS line from the PC notifies the SX that data is waiting to be sent. When the SX modifies the signal on the PC's CTS line, then the RS232 buffer will send data to the SX.
Gary
The SX has built-in I2C commands. You could control the I2C devices directly.
As for communicating with the PC, you could use a "PINK" (ethernet web server) with the SX constantly updating PINK. The PC then calls up the information via a common web browser. If you needed "logging" capability, you could set the web browser to "refresh" every couple of seconds using a META TAG and then have it write the data to a local log file. One limitation (I think) is that the META TAG can only update at a maximum rate of about once every 2 seconds. If you need faster updates, another solution (i.e. a direct RS-232 link) will have to be found.
John.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College