Hi,
I have an embedded system with an AT89C51SNDC1 (which have only one UART) So actually I have only one external serial connection for debugging this UART by a DB9 connector.
for my new application I must implement the reading of data comming from a GPS oem (each second). Because of I have only one UART (on pins P3.0 and P3.1 are connected a debug cable) incoming data from GPS must be connected to the same pins of connector of UART than use for debugging (perhaps only on RX pin of the µc because of GPS incoming), so I think so but I don't know if it is correct?
for that I suppose to use every short time of each second reading of data coming from GPS in my infinite loop, but how exactly do that? Must I use software interrupts?
In my actual program there is no interrupts.
So how must I implement that, could you help me please?
PS: So I suppose that hardwarelly I will have an external connector with "Y" cable.
Thank you
Best Regards,
Sems
Multiplexing the data could be done by limiting the two streams to 7-bit data, and using he 8:th bit as selector. This would allow a PC program to send typed characters immediately to your application.
An alternative could be to multiplex a full line at a time, i.e. the first character received after a newline character is the mux character, specifying if the next line of text is NMEA data or debug data.
Both alternatives requires you do write a little application on the remote side, to pick up GPS data from an external GSM module (or simulate it) and feed in one mux channel, and to display some form of console or GUI for the monitor interface.
If you have existing code, it can be done fast and cheap. If you start from zero, the required time can be very high - especially if you have never worked with serial ports on Windows, Linux or whatever OS you run.
Which, of course, begs the question: would that time be better spent re-spinning the PCB...?
;-)
I would definitely have selected updated hardware. The spin-off from a better suited hardware can potentially lead to other market niches being available.