Re: PIC16F690 and HD44780 display
- From: stratus46@xxxxxxxxx
- Date: 14 Jun 2006 21:44:56 -0700
Randy Day wrote:
I'm trying to get a PIC16F690 (mplab's PICKIT 2)<snip code>
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.
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
.
- References:
- PIC16F690 and HD44780 display
- From: Randy Day
- PIC16F690 and HD44780 display
- Prev by Date: Re: Basic current question
- Next by Date: Re: Relay used to control home appliance
- Previous by thread: Re: PIC16F690 and HD44780 display
- Next by thread: Re: PIC16F690 and HD44780 display
- Index(es):
Relevant Pages
|