This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with simulated serial mode

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?

Parents
  • 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
    
    by
      MOV R2,#116
    
    it works fine (why???).
    16 bit, nonmultiplexed bus
    MCTC=1 waitstate
    MTTC=0,5 waitstate
    57600 bit/sec
    the values are
    C_VAR1=116
    C_VAR2=70
    C_VAR3=78 (calculated: 71)


Reply
  • 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
    
    by
      MOV R2,#116
    
    it works fine (why???).
    16 bit, nonmultiplexed bus
    MCTC=1 waitstate
    MTTC=0,5 waitstate
    57600 bit/sec
    the values are
    C_VAR1=116
    C_VAR2=70
    C_VAR3=78 (calculated: 71)


Children
No data