Re: PIC16F690 and HD44780 display



Randy Day wrote:
I'm trying to get a PIC16F690 (mplab's PICKIT 2)
to send characters to a 2x20 HD44780-based display.
I've cobbled bits from various sources into an
assembly program, but all I get is a row of black
boxes across the first line.

The circuit is wired as follows:
micro display
RC0-RC7 pin 7-14 (DB0-DB7)
RB4 pin 4 (RS)
RB5 pin 5 (R/W)
RB6 pin 6 (E)

I've run the mplab simulator on the code below, and
it seems to put out the signals in the right order,
but obviously the display does not agree on 'right'! ;)

Can anyone point me to where the problem lies? Is it
a timing issue?

Code follows.

<snip code>

I'm not a PIC guy but I have used displays with Motorola processors in
assembly language. The initialization is not difficult but must be done
as described in the data sheet on the processor. IIRC it was send a
start sequence, wait 20mS, send it again, wait 4.5mS, send again, etc.
If followed, it works just fine. The automatic hardware init never
worked for me but the 'programmed' init always did. I never used the
busy flag for comm as I just 'spread out' the data through the main run
loop. What's the point of waiting for a busy flag when there are other
tasks to be done?

I found a website for the 44780 that includes PIC code examples. Here
you go.

http://ouwehand.net/~peter/lcd/lcd2.shtml#PIC_lcd_init

GG

.



Relevant Pages

  • Re: LCD display Busy Flag
    ... Can i check the busy flag of the display while continously keeping the ... need to use it if you use a timer, this is fine for small displays (up ... Using a 2kHz timer interrupt, I get 25 screen updates/second, which is ...
    (comp.arch.embedded)
  • Re: LCD display Busy Flag
    ... Can i check the busy flag of the display while continously keeping the ... Enable high or should i pulse the enable? ... need to use it if you use a timer, this is fine for small displays (up ...
    (comp.arch.embedded)
  • Re: LCD display Busy Flag
    ... Can i check the busy flag of the display while continously keeping the ... need to use it if you use a timer, this is fine for small displays (up ... Using a 2kHz timer interrupt, I get 25 screen updates/second, which is ...
    (comp.arch.embedded)
  • Re: PIC16F690 and HD44780 display
    ... Randy Day wrote: ... to send characters to a 2x20 HD44780-based display. ... assembly program, but all I get is a row of black ...
    (sci.electronics.basics)