As I found, any simple code with LCD and dsPIC30F2010 have this issue. I've completed few projects recently with dsPIC. when the oscillator is selected as HS and using a 20MHz crystal, it is ok to run the code and the LCD(16X2).
But to get a good result, the oscillation should be used by multiplying using PLL (x16) keeping the oscillator 7.5MHz in circuit. So that the maximum frequency of dsPIC30F2010 can be achieved.
Even if I use 40MHz crystal without PLL multiplication both in code & circuit, LCD shows garbage value. Seems like timing issue. I have no proteus library for dsPIC30F2010, so that I can not draw the circuit in proteus. But any circuit works in this same way. There is a solution of course. Because, I've checked some designs where they are using 6.144MHz crystal but using very fast timing and response is high which is not possible without using PLL (x16).
- - - Updated - - -
Hi,
Here I am.
Yes, I agree with Brian: timing problem.
But without useful informations..all we can do is guessing.
No information about
* code
* display type
* connections
* wiring, wire length
* power supplies
* logic levels...
Klaus
Code: Any simple code with LCD have this issue.
Display type: Standard HD44780 LCD,
Connections: as I do not have the library file for dsPIC30F2010 so I can not draw the diagram but any working circuit have same issue.
Wiring: PCB, length: <6cm
Power: 5V DC, 1.5A ripple: <0.001v
Logic Level: 5V digital logic.
It seems like timing issue with LCD.
- - - Updated - - -
Likewise but I wonder if the PLL in question is the internal clock multiplier. It would be useful to have some more information.
If it is the internal multiplier, the chances are the timing signals are too fast for the LCD to respond to. The usual delays in the program would have to be recalculated using the multiplied frequency rather than the input clock frequency.
Brian.
I found one solution using a shift register to drive the LCD and 2/3 wires connection to send the commands to shift register from MCU. But that increases the parts number. I found some designs where they are not using any shift registers but using PLL to get fast response. One point I found that they are not writing any information on the LCD instantly, letters or symbols are being printed serially. That means, if I want to display "Text" on the LCD, they are printing like "T" (20-50ms gap),"e" (20-50ms gap),"x" (20-50ms gap),"t".
So what can we get from this clue?