RL78 UART, TXD0 is not sending data

hi,

I am implementing UART using RL78 f12, I am trying to send simple one character data to PC, I am able to see the data on simulator and TXD0 register shows the data, but when I try to implement the same on hardware, I cannot see the data on TXD0 register. 

  • Hi aksh,

    did you consider some precaution provided in page 6 of this note link->documentation.renesas.com/.../r01an0459ej0200_rl78g13.pdf

    or

    can you elaborate the issue on you "...implementing the same on hardware.."?

    Best,

    Mark Baulo

    Renesasrulz Moderator

  • In reply to JB:

    Hey, Mark

    by  "...implementing the same on hardware.." I mean the c code written for UART communication is able to display the data on TXD0 register on simulator but when I try to run on hardware using 'same'  code does not show the register TXD0 with any data, also other UART registers are not showing any values.

    The hardware connections are fine, the development board is provided by Renesas .  

    Cheers!

  • In reply to aksh:

    A simulator is useless for peripheral debugging. The simulator does not care about correct UART initialisation.

    Which tools do you use?

    Do you use e2 studio or CS+ or IAR EW?

    Have you used Applilet (or Peripheral Code Generator inside e2 studio) to generate the processor initialisation? If not I would recommend you do so. This is the easiest way to set up initialisation code for RL78.

    Which compiler do you use? CCRL or IAR ICC?

  • In reply to FrankL:

    Hey Frank,

    I am using CS+ with code generator and  CCS78K0r compiler, therefore I am sure the initialization is correct. I am receiving garbage values on PC terminal. So the hardware seems to OK, as it is showing garbage values. The terminal also shows "Framing Error".

  • In reply to aksh:

    When you receive garbage on the PC usually only the communication speed is wrong. This should be easy to fix.

    Do you have a special reason why you use CCS78K0R? I have never used it but I heard the compiler should not be the best one. Probably better than GNURL, but not as good as CC-RL or IAR EWRL.

  • In reply to FrankL:

    Hi, have changed baudrate for all possible values but no joy.

  • In reply to aksh:

    Hey finally found the solution- there were wrong capacitor connections for MAX232 IC on dev board, I changed them, everything is working right.

  • In reply to JB:

    gan bo ji ma ra