Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LCD Help - 4 DataBus not 8

Status
Not open for further replies.

Hobe

New Member
First post!

I'm trying to work with an existing assembly file. Its perfect in every way, apart from I need to free up some pins on my PIC (as I need additional switches and sensors). The only way I can fit it all in is to use 4DB lines not the 8 that the assembly file currently uses.

I'm fairly new to assembly coding, so I was wondering if someone could help me on my way to making the attached assembly run with 4db lines.
 

Attachments

  • countLCD.txt
    11.9 KB · Views: 182
8 databus schematic link: Link

I hope this is enough info. The 4 databus line schematic is exactly the same but only using databus lines 4-7 not 0-7. If there is any more information I can supply to help please let me know.
 
Last edited:
Any help at all would be appreciated :eek:
hi,
I did look at your program earlier, sorry, but its not a quick fix, it not well commented.
The LCD module lines for 4 bit are D7,6,5,4 , the high nibble
You have then to decide which nibble of the PORT you want to use, ie: high or low.
You need an additional ram buffer to hold the byte you are going to write to the LCD, so that you swap the nibbles over as you send them to the LCD.

EDIT:
Tried your program in Oshonsoft, it will not run.
Goes into fixed loop ???
 
Last edited:
Hi,

The code is to check input frequency, so i think the loop may just be checking the frequency? This is a bit tricky for me to understand. Does it matter if i use the low or high nibble for the port, will it make a difference?

I'll start looking into how to add a ram buffer for the additional nibble.
 
Hi,

The code is to check input frequency, so i think the loop may just be checking the frequency? This is a bit tricky for me to understand. Does it matter if i use the low or high nibble for the port, will it make a difference?

I'll start looking into how to add a ram buffer for the additional nibble.
hi,
The 4, LCD PORT data lines must be on a nibble, high or low will do.
The LCD Control lines can be any other free pins you choose.

Choosing the PORT Data nibble depends upon which lines you MUST use for some program functions.
If you want to use say PORTB.0 as an edge interrupt, that nibble is committed, so you could use say the PORTB high nibble, unless you wanted to say use a keypad and interrupt on change on PORTB.7.6.5.4
If you are short on pins, you could connect the LCD R/W to 0V, leaving a pin free.
I would consider using a PIC with more pins.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top