|
|
View previous topic :: View next topic |
Author |
Message |
elmar44
Joined: 07 Jun 2005 Posts: 1
|
How can i use two LCDs at one time (change driver) ?? |
Posted: Tue Jun 07, 2005 5:34 am |
|
|
Hello erverybody !
I'am a new C programmer...
...and my first project starts with a problem:
a power generator with two LC-Displays !
So - how can i tell the driver to use LCD #1 for message 1,2,3
and use LCD #2 for message 4,5,6 and so on..
The Displays are wired in parallel - only the enable pin is seperated
to differend port pins.
The used Controller is a : PIC18F6720
The hardware connection is:
PORT D :
D.0 enable LCD#1 (this is default for the driver)
D.1 rs
D.2 rw
D.3 enable LCD#2 ( normaly not used by the driver )
D.4 data 4
D.5 data 5
D.6 data 6
D.7 data 7 data for the LC-Display
I can manualy change the struct assignment to get access to LCD#1
or to LCD#2 ....but this should be possible by the program.
Please Help !
Thanks
Elmar |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jun 07, 2005 3:05 pm |
|
|
Here's a page that discusses using two LCDs.
I have no idea if it works -- I'm just providing the link.
Scroll about half-way down the page to see the schematic
and code (in basic).
http://www.picbasic.co.uk/forum/showthread.php?t=626 |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Tue Jun 07, 2005 4:11 pm |
|
|
It seems as easy as enable, print, disable.
Code: | #include <18F452.H>
#CASE
#USE DELAY(CLOCK=16000000)
#FUSES HS,NOWDT,NOPROTECT,NOLVP,NOWDT,WDT128,NOOSCSEN,NOBROWNOUT,NOPUT,NOSTVREN
#DEFINE VER_MAJOR 1
#DEFINE VER_MINOR 01
#USE RS232(BAUD=19200,XMIT=PIN_E0,RCV=PIN_E1,INVERT,STREAM=DEBUG)
#ZERO_RAM
#include <stdio.h>
#include <stdlib.h>
#include "C:\ccs\Projects\Sample code\LCD_PICDEM2.C"
#define LCD1 PIN_D0
#define LCD2 PIN_D3
//======================= MAIN ============================//
void main(void)
{
fprintf(DEBUG,"STARTING DS12887 Test.\n\r");
fprintf(DEBUG,"FIRMWARE VERSION %u.%02u\n\r",VER_MAJOR,VER_MINOR);
output_high(LCD1);
lcd_init();
output_low(LCD1);
output_high(LCD1);
printf(lcd_putc,"Hello world\n");
output_low(LCD1);
do{
}while(TRUE);
}
|
What is the struct your talking about? Without some code its hard to help you. |
|
|
sags_v
Joined: 12 Feb 2006 Posts: 1 Location: Queretaro, Mexico
|
ds12887 question!! |
Posted: Sun Feb 12, 2006 1:30 pm |
|
|
Hello, Intente to use your code for the driver of the RTC ds12887, but he says " lithium battery dead " to all my DS12887, I do not believe that all of them the battery exhausts, since it had never used them and scarcely a few weeks ago came to me.
Really not that to do to make my application work, I Am using a pic18f458, verify the directions of the ports and the same message keeps on appearing, also all the earnings that I give him for the RS232, he reads them immediately later as 0
Some suggestion?
sorry my bad english!! ;) |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|