Hi guys, I'm new using Arduino and right now I'm trying to connect
two 7 segment display to Arduino uno's ports. I'm not allowed to
use digitarRead(), digitalWrite(), pinMode() nor any other auxiliar component
it has to be directly to the arduino's ports (this is a homework).
I was able to connect 1 display to port D using an Common Anode 7 segment
display, it works fine, but I can not do the same for the second display
since portB and portC do not have 7 pines to connect the second the display.
And what I'm trying to show on one of the displays is the next sequence of digits:
201700390
and on the other display I need to show the sequence: 20210309
here is my code:
byte digitsD1[9]={B00100100,B01000000,B01111001,B01111000,B01000000,B01000000,B00110000,B00010000,B01000000};
byte digitsD2[8]={B00100100,B01000000,B00100100,B01111001,B01000000,B00110000,B01000000,B00010000};
void setup() {
DDRD=B11111111;
}
void loop() {
for(int i=0; i<9; i++){
PORTD=digitsD1[i];
delay(500);
}
}
It works fine for the first display, but I can not figure out a way to show the content of digitsD2 array on the second display.
Any ideas?