To have the serial port S0 free for the application, I want to use the simulated serial mode. The UART ASC0 mode works correctly (burned to external FlashROM), but not the simulated serial mode (seems to have no connection). The controller does not answer to the PC (checked with an oscilloscope). I'm using P8.6 and P8.7 as data lines (changed in inst167.a66) and a RS232 transceiver. BAUDRATE is 9600, CPU_CLOCK is 19660800. What could be wrong?
Make sure you edited Inst167.a66 to assign correct port direction control bits (DP8.6, DP8.7). Once you set the right configuration it'll work just fine. Regards, Mike.
Thank you for your tip! It was set right. With another port (P8.5) and BSET an BCLR I found, that the character input routine INCHAR of inst167.a66 works proper, but not the OUTCHAR witch is called by the Monitor (.lib). I suppose a problem with the BAUDRATE and/or CPU_CLOCK, but I think it is set right in config.inc and the "Options for Target - Debug" monitor driver settings. Ulf
It's like launching space shuttle: so many things can go wrong. It took me a while to get the simulated serial mode working too. In the end it always turned out that I overlooked some configuration settings. I can only wish you good luck.
Thank you! After a lot of work my space shuttle is flying, but only with 9600 bit/sec. If I try higher baudrates I get the Monitor Error Message Nr. 2 "Bad serial transmission". With a scope I saw, that PC and uC were trying to get connection (some bytes on TXD and RXD). The timing seems to be OK. But 9600 is better than 0!
Now it works with 57600 bit/sec! The problem seems to be the C_VAR1 to C_VAR3 which represent the delay between the bits. When I calculate the values per hand and replace for example
MOV R2,DPP0:C_VAR1
MOV R2,#116
View all questions in Keil forum