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
Hello, I have the same problem. I want to use the simulated serial. But I always get the message "Bad Serial Transmission". You wrote that after a lot of work your interface works. What have you done? Please tell me all steps you did. Thank you very much for your answer. Yours Simon
Hi Simon! Did you read the README.TXT in the \C166\MONITOR - directory? It describes all necessary steps. 1. First you have to generate the monitor with option: SIMULATED SERIAL MODE. Take care for the CONFIG.INC-file! Example: %DEFINE (DATA_START) (0BA600H) %DEFINE (CODE_START) (000000H) %DEFINE (VECTAB) (80000H) Compile it and then burn it to your Flash-ROM. After a reset the controller is ready to load the program with µVision. 2. Create a new target with your program and choose "Monitor in ROM" (Options for Target/Debug/Settings...). Don't select "Use on-chip ROM". Your data AND program has to be located in RAM. My RAM starts from 0x80000 (size 0x40000). Reserve the addresses for ASC0 and monitor data (DATA_START+512Bytes min.) Target Dialog: External Memory Start Size ROM 0x80000 0x20000 RAM 0xA0000 0x20000 Interrupt Vector Table Address 0x80000 Reserve: 08H-0BH,0xBA600-0xBFFFF I'm working with my own minimal system (ST10F168 + 256k RAM). BTW: After all I found that the maximal baudrate in simulatetd serial is 19200. I hop this will help you. Otherwise we need mor details about your hardware and configuration. Ulf