|
|
View previous topic :: View next topic |
Author |
Message |
DanA
Joined: 15 Jul 2006 Posts: 2
|
8 x 24 LCD |
Posted: Sat Jul 15, 2006 12:19 pm |
|
|
Hello, this is my first post. I'm fairly new to electronics, have a 16F627A and had a flashing LED as a test, then was experimenting with driving 12v relays, now want to get an LCD working.
I have a 24 x 8 LCD - Info on these sites:
http://www.btinternet.com/~markd833/LCD/intro.htm
http://www.btinternet.com/%7Ee2one/lcd/lcd.htm
http://www.btinternet.com/~e2one/avrbrd/biglcd2.htm
I've only got TX connected to the LCD RX - I will not need to transfer the other way, and I have power to the LCD - now all I need is the code to get it talking.
My c skills leave a lot to be desired and most of what I have done already has been borrowing code from other code (best way to learn I think) along with the assistance of a friend over msn... who I think has blocked me as he is fed up of my ramblings and stupid (to an expert) questions.
Judging by what I have read, most LCDs have to have their own driver because of the varying size. LCD.h along with some others seem to be far more complicated than I had expected - because they seem to be aimed at non-serial ones with many more connections to the PIC.
I have been told that all I need to do is put:
Code: | #use rs232(baud=9600, xmit=PIN_B2) |
then use printf (but I'm not sure how to do this)
Can anyone explain (in dumbest terms) what I need to do to start outputting to my LCD?
Thanks in advance for any help you can give me.
Dan |
|
|
DanA
Joined: 15 Jul 2006 Posts: 2
|
|
Posted: Sat Jul 15, 2006 5:16 pm |
|
|
http://ccsinfo.com/forum/viewtopic.php?t=25905
Found this, which looks like my setup. Doesn't seem to work for me though. Is there any reason it shouldn't work? I have made the necessary changes for my setup (clock speed, xmit pin, led pin) - My code:
Code: | #include <16F627A>
#device ADC=10
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, parity=N, xmit=PIN_B2, bits=8)
void main() {
{
output_high(PIN_A0); // LED ON
printf("\r\n-----HELLO-----");
delay_ms(1000);
output_low(PIN_A0); // LED OFF
} while(TRUE);
} |
If there is no reason for this not to work, I will dismantle and re-check all connections |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
|
|
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
|