hi- I am trying to use the serial port for input and output. I first tried to use the interupts but the Keil software's monitor overwrites our interupt. We've switched to scanning for data. I have seen references on this forum to using scanf. I have tried this but I can never type in the serial window for the simulator or in a hypertermal window when running on the board itself. How have people been able to use serial input? Thanks -John UC Berkeley Solar Car Team
Hi James, Keil's C166 package includes some sample code. Look in Keil\C166\EXAMPLES. The Measure example contains simple serial IO with transmit/receive flag polling. The Traffic example contains code for interrupt-driven buffered serial IO (it uses RTX Tiny OS). We overcame the monitor/serial conflict before by flashing the board and calling printf. That means you can't use the monitor to debug your application in target hardware. That's too bad. I would still recommend that you configured Monitor166 in simulated serial mode and used another serial port for debugging. This way you would be able to debug serial IO as well. Reconfiguring the monitor requires reading manuals and can't be done without some trial and error, but it's well worth it. Unless you are confident that you don't need debugger, of course. Best luck, - mike
Hi, I'm try to read some data from the serial plug P2 of my KC 167-CR LM. I search everywhere, but I don't find what I have to configure. I try to read data from a GPS Antenna (GPS 910). I try to configure SSC Part of Dave genrating code, no result... I tried ASC0, for plug P1, no result... Can someone help me, please??????