Hi eeuser!
I just compiled the code (again) and tested it on my EasyPIC3 - works fine.
And I had problems at he begginning, too
. The problem my be with the delays. Let me try to explain it.
My EasyPIC3 is clocked by 8MHz crystal and that signal produces 48MHz clock for PIC18F4550. (If I am wrong, anybody, please correct me!). That means that PIC can send far more commands than periferal can accept. Because of that, we must include some delays between the commands that we send to the periferal.
As you can see from the code, first we prepare all the data at the necessery pins, assert the ENABLE pin and immediately deassert it. The instruction will be executed in the
FALLING edge of the ENABLE pulse. This means that the assertion of the ENABLE pin will be ignored by TLCD and the delay is not necessery after the assertion. After that I am using the
Delay1KTCYx(20); after ENABLE signal to give the TLCD necessery time to complete the previous instruction.
So, my suggestion is to experiment with the amount of delay: start with
Delay1KTCYx(255); and if TLCD starts to work, lower the amount of delay to the moment the TLCD stops working. Than use the previous working delay.
Peca.