![]() |
Forum Index : Microcontroller and PC projects : E28 RS232 comms
Author | Message | ||||
BrianP Senior Member ![]() Joined: 30/03/2017 Location: AustraliaPosts: 292 |
Hi all I'm trying to get my head around the best way to implement RS232 comms in my current E28 project. There is only one RS232 circuit available, the need is for data 2-way transfers under program control, but also console usage when program not running (for remote editing purposes). Can I just use the console connection for all of this, or do I need to to visit a more esoteric means, such as a changeover relay that say, uses com1 when the program is running but switches to console connection if / when the program terminates? What is on the remote end is an Internet connected laptop with an RS232 USB/serial adaptor to allow remote monitoring / modification of the system. Separate question: If using a USB connection & we were to use "console invert" to allow RS232 comms on the console pins would this trash the USB connection & only be recoverable by a reset? All thoughts welcome... B |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
There is no reason why you can't use the console for data communications. The first question is what sort of data? Is is all 'ASCII printable characters' or can the data contain all 256 characters. chr$(0) may cause issues and control-C certainly will if you haven't turned the break character off. If you do turn the break character off, your program will need some way of exiting. The methods of reading incoming data over the console are slightly different to a serial port but there is nothing to stop it from working. I have been using this method since the beginning of time - 2011 when the maximite first appeared. Jim VK7JH MMedit |
||||
BrianP Senior Member ![]() Joined: 30/03/2017 Location: AustraliaPosts: 292 |
Hi Jim All ASCII printable (via the keyboard) so no worries there. Only remains the issue of inversion to read the console data pins via RS232 & the issue of potentially locking out the USB connection by so doing - I might be better off using hardware comms inversion to the console pins & leaving the USB available IF required. Manually sending a Ctrl-C would have the required result to enable program modification etc. Thanks B |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |