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.
did you consider some precaution provided in page 6 of this note link->documentation.renesas.com/.../r01an0459ej0200_rl78g13.pdf
can you elaborate the issue on you "...implementing the same on hardware.."?
In reply to JB:
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 .
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:
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".
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.
Hi, have changed baudrate for all possible values but no joy.
Hey finally found the solution- there were wrong capacitor connections for MAX232 IC on dev board, I changed them, everything is working right.