Pages: [1]   Go Down
Author Topic: Arduino and CD4511  (Read 3899 times)
0 Members and 1 Guest are viewing this topic.
Romania
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks!!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm new to Arduino... and I need some help. I'm sorry if someone else posted this question already but... here it goes:
I am trying to use two CD4510 IC's which in turn drive two 7 segment digits.
The problem I have: how do I set a counter which counts from 1 to 99 and transform that in binary and then output to pins 2-9.

I think it would be easy to use Arrays but I have no idea how to output an array of values...
I thot about doing something like:
Pins[]={2,3,4,5,6,7,8,9}
and then output something like:
[LOW, HIGH,...,LOW, LOW]

Therefore I'm stuck. Any help will be appreciated.

Thank you,
A.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 631
Posts: 34491
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am trying to use two CD4510 IC's which in turn drive two 7 segment digits.
That is an up / down counter, it is not a chip that you can use for your project. What wiring had you thought of using?

Yes driving 7 segment displays is possible look at the schematic, the words are in German but the schematic is in electronics:-
http://www.andreadrian.de/schach/#Selbstbau_Schachcomputer_SHAH

Quote
I think it would be easy to use Arrays
Yes it would.

http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html

http://www.instructables.com/id/Arduino-an-easier-way-to-work-with-seven-segment-/
« Last Edit: November 29, 2010, 01:27:08 pm by Grumpy_Mike » Logged

Romania
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks!!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ups... my first post and a wrong one... :-[ I am using a CD4511... sorry.. I was loking at a 4510/4511 schematic I had around...

I forgot to mention... I already hooked up the two 7 Segment LED display to the IC's and the arduino. If I put a code like:

Code:
int ledPin2 = 2;
int ledPin3 = 3;
int ledPin4 = 4;
int ledPin5 = 5;
int ledPin6 = 6;
int ledPin7 = 7;
int ledPin8 = 8;
int ledPin9 = 9;
void setup()
{
 pinMode(ledPin2, OUTPUT);      
 pinMode(ledPin3, OUTPUT);      
 pinMode(ledPin4, OUTPUT);    
 pinMode(ledPin5, OUTPUT);    
 pinMode(ledPin6, OUTPUT);      
 pinMode(ledPin7, OUTPUT);    
 pinMode(ledPin8, OUTPUT);    
 pinMode(ledPin9, OUTPUT);  
}

void loop()
{
 digitalWrite(ledPin2, HIGH);
 digitalWrite(ledPin3, LOW);
 digitalWrite(ledPin4, HIGH);
 digitalWrite(ledPin5, LOW);
 digitalWrite(ledPin6, HIGH);
 digitalWrite(ledPin7, LOW);
 digitalWrite(ledPin8, HIGH);
 digitalWrite(ledPin9, HIGH);


  
}
I can output the desired value... but it's static. What I am trying to do is make some binary counter.
I have 2 CD4511's and two 7segment digits... therefore the 8 pins...

As for the purpose of this... i want to make temp measurements and display them. Since I have no LCD at disposal I figured I could use the 7 segment display I already had. But using 14 pins instead of 8 ... made me think I could use the 4511(got it right now smiley-grin ) to reduce the number of pins necessary.

A.
« Last Edit: November 29, 2010, 02:17:06 pm by Sajuuk » Logged

Romania
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks!!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Grumpy_Mike for the links. I will try to make sense of them smiley

A.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 631
Posts: 34491
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to say how it is wired up then we can post code to help you drive it.
Logged

Romania
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks!!!!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm sorry about my absence.

I connected the two 4511's to pins 2 to 9. And each of the 4511's have a 7 segment display connected, thus I have a 2 digit number available. As a simple, static value, i managed to make this work. But I would like to change the value as the program runs, e.g.: i measure a temp or a voltage on pin A0 and then output to the display.

A.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use the SHIFTOUT coding to get a binary out of numbers.

I use it from Adruino to a cd4511 to a cd4049 to a seven segment LED.
Logged

Pages: [1]   Go Up
Jump to: