LCD question
Moderator: Benj
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
LCD question
Hi
I'm having trouples getting the LCD up and running. When using E-blocks there's no problem at all, but when I download the same program to a STK500 and connect a LCD as:
[LCD] [STK500 PORTC HEADER]
1 GND- 9 GND
2 +5V- 10 VCC
3 VLC- LCD contrast control voltage 0..1V
4 RS - 1 PC0
5 RD - 2 PC1
6 EN - 3 PC2
11 D4 - 5 PC4
12 D5 - 6 PC5
13 D6 - 7 PC6
14 D7 - 8 PC7
It's a no-go.
Before using Flowcode, I programmed in C using CodeVision via the connections showed above and didn't have any problems doing so, but I would like to do this in Flowcode as well.
I can see that CodeVision use D4-D7 and Flowcode use Data1 - Data4 - I do not know if this is a problem?
I am running an AVR on a 16MHz crystal.
I hope someone can help me clear out this problem.
BR.
Tomas
I'm having trouples getting the LCD up and running. When using E-blocks there's no problem at all, but when I download the same program to a STK500 and connect a LCD as:
[LCD] [STK500 PORTC HEADER]
1 GND- 9 GND
2 +5V- 10 VCC
3 VLC- LCD contrast control voltage 0..1V
4 RS - 1 PC0
5 RD - 2 PC1
6 EN - 3 PC2
11 D4 - 5 PC4
12 D5 - 6 PC5
13 D6 - 7 PC6
14 D7 - 8 PC7
It's a no-go.
Before using Flowcode, I programmed in C using CodeVision via the connections showed above and didn't have any problems doing so, but I would like to do this in Flowcode as well.
I can see that CodeVision use D4-D7 and Flowcode use Data1 - Data4 - I do not know if this is a problem?
I am running an AVR on a 16MHz crystal.
I hope someone can help me clear out this problem.
BR.
Tomas
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: LCD question
Hi can you post your flowchart as it will be easier for someone to help if they can see your code
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
Re: LCD question
Of course
It's only a testprogram - so it only consist of a while-loop and a displaymacro.
It's only a testprogram - so it only consist of a while-loop and a displaymacro.
- Attachments
-
- Text.fcf_avr
- (5 KiB) Downloaded 267 times
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: LCD question
Hi i had a quick look at your flowchart, and reread your post, in tyour post you say you have set your stk500 lcd to port c, the flowcode says under lcd connections you are using portD ,try changing the lcd component conections to match the ones in you post portC hope that makes sense.. ive done the changes to your chart and attached it hth
- Attachments
-
- Textportc.fcf_Avr
- (5 KiB) Downloaded 238 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
Re: LCD question
Hi dazz
Thanks for you help.
However - The C-code is just taken from a previous project - I have connected the LCD to port D on the E-blocks board and it works here. I then took a 24x2 LCD, that I previous had working on the STK500 - connected it to port D on the STK500 board with the simple test program I send you, but it doesn't seem to work here.
Thanks for you help.
However - The C-code is just taken from a previous project - I have connected the LCD to port D on the E-blocks board and it works here. I then took a 24x2 LCD, that I previous had working on the STK500 - connected it to port D on the STK500 board with the simple test program I send you, but it doesn't seem to work here.
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: LCD question
Hi tomas
im not sure weather you can use a 24x2 i think you can use 16,20 and 40 character displays hth
im not sure weather you can use a 24x2 i think you can use 16,20 and 40 character displays hth
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
Re: LCD question
Hi dazz
That´s right, but I have been told that if I select 40 lines, I just have to make sure not to use the last 16 characters - then it should't be a problem.
That´s right, but I have been told that if I select 40 lines, I just have to make sure not to use the last 16 characters - then it should't be a problem.
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: LCD question
Hi Tomas
You say you are using a 2 x 24 lcd.
This size isnt supported in FC though I think it will still work though the last 4 characters in each line may not be usable.
Set to 2 x 20 in FC
I'm not familiar with the STK500 or AVR devices
Looking at your connections
What is RD? Im not sure what this is for. I dont see a connection for this on the flowchart
On the list above Enable is going to PC2 but on the flowchart its to connected PC1
You say you are using a 2 x 24 lcd.
This size isnt supported in FC though I think it will still work though the last 4 characters in each line may not be usable.
Set to 2 x 20 in FC
Do you mean the Eblock LCD & the Eblocks AVR programmer.I have connected the LCD to port D on the E-blocks board and it works here
I'm not familiar with the STK500 or AVR devices
Looking at your connections
What is RD? Im not sure what this is for. I dont see a connection for this on the flowchart
On the list above Enable is going to PC2 but on the flowchart its to connected PC1
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
Re: LCD question
Hi JohnJohnCrow wrote:Hi Tomas
You say you are using a 2 x 24 lcd.
This size isnt supported in FC though I think it will still work though the last 4 characters in each line may not be usable.
Set to 2 x 20 in FC
That's a smaller problem - I think, I'll do as you suggest
I have connected the LCD to port D on the E-blocks board and it works here
Yes. I have a EB019 AVR board and connected a EB-005 LCD board to this board. It's no problem having the simple test program executed here.JohnCrow wrote:Do you mean the Eblock LCD & the Eblocks AVR programmer.
I'm not familiar with the STK500 or AVR devices
RD = Read, but I have never used this option. This isn't used in Flowcode, so I'm not sure what to do with this input.JohnCrow wrote:Looking at your connections
What is RD? Im not sure what this is for. I dont see a connection for this on the flowchart
Perhaps one of my problems?JohnCrow wrote:On the list above Enable is going to PC2 but on the flowchart its to connected PC1
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: LCD question
Hi Tomas
RD now you say that I remember seeing this in data sheets.
Flowcode does not use the RD option
I built a custom 4 x 20 display, on that its called R/W and I have that line to ground.
Try setting F/C so the enable line is to the same pin on the hardware as in the flowchart and grounding RD
I think as you have it at the moment the enable line is not connected to where the software thinks it is.
RD now you say that I remember seeing this in data sheets.
Flowcode does not use the RD option
I built a custom 4 x 20 display, on that its called R/W and I have that line to ground.
Try setting F/C so the enable line is to the same pin on the hardware as in the flowchart and grounding RD
I think as you have it at the moment the enable line is not connected to where the software thinks it is.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
Re: LCD question
Hi againJohnCrow wrote:Hi Tomas
RD now you say that I remember seeing this in data sheets.
Flowcode does not use the RD option
I built a custom 4 x 20 display, on that its called R/W and I have that line to ground.
Try setting F/C so the enable line is to the same pin on the hardware as in the flowchart and grounding RD
I think as you have it at the moment the enable line is not connected to where the software thinks it is.
I will try to make the changes, you suggest in the morning.
Thank you for your help!
BR.
Tomas
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: LCD question
Hi
Ok, hope you can get it sorted now.
Ok, hope you can get it sorted now.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 75
- Joined: Wed Oct 28, 2009 2:37 pm
- Has thanked: 15 times
- Been thanked: 1 time
- Contact:
Re: LCD question
Hi JohnJohnCrow wrote:Hi
Ok, hope you can get it sorted now.
Sorry I didn't got back to you sooner.
I got the LCD up and running - connected the RW-pin to ground and got the timing right.
So thanks for all your help - I really appreciated it
BR.
Tomas
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: LCD question
Hi Tomas
Thats great, glad to hear you've got it sorted
Thats great, glad to hear you've got it sorted
1 in 10 people understand binary, the other one doesn't !