Go Down

Topic: 3 digit 7 segment display works on UNO but displaying jibberish using ATTiny2313 (Read 1 time) previous topic - next topic

septillion

Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

PaulRB

Ah, sorry, I missed that!

It won't open on my phone. Will try on pc later.

hahobson

http://codeandlife.com/2012/02/24/7-segment-multiplexing-with-uln2003-pnp-transistors/

Wondering if this code could be helpful

PaulRB

Your original code is good. It worked on the Uno. You just have the wiring wrong because the pins are different on the attiny.

Use this diagram to help you check. Its the blue Arduino pin numbers that you need to get right in your sketch.


Compare them to the pin numbers on these lines:
Code: [Select]
//  mapping segment DP,G,F,E,D,C,B,A  data pin
const int segmentPins[8]         = { 7,6,5,4,3,2,1,0 };
//  mapping digit 1,2,3  data pin, skip pin 13 on board LED
const int digitPins[nbrDigits]   = { 8,9,10 };


If they don't match up, either change the numbers in the arrays, or change the physical wiring to match.

hahobson

Your original code is good. It worked on the Uno. You just have the wiring wrong because the pins are different on the attiny.

Use this diagram to help you check. Its the blue Arduino pin numbers that you need to get right in your sketch.


Compare them to the pin numbers on these lines:
Code: [Select]
//  mapping segment DP,G,F,E,D,C,B,A  data pin
const int segmentPins[8]         = { 7,6,5,4,3,2,1,0 };
//  mapping digit 1,2,3  data pin, skip pin 13 on board LED
const int digitPins[nbrDigits]   = { 8,9,10 };


If they don't match up, either change the numbers in the arrays, or change the physical wiring to match.
Thank you !   I will look into it and report back. 

hahobson


septillion

Then you still do it wrong...

Did you do what I suggested in reply #13? No photo is read as "No, I did not".
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

hahobson


septillion

Then don't... Grab a perfboard or breadboard and get the concept working...
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

PaulRB

We are using a PCB.  Please see attached
What is your role in the team, exactly? Did you design that PCB? I suspect not. So where is the person who designed that PCB? And why have they stopped helping you and left you to to flounder?

The problem still persists. 
Looking at your PCB layout and comparing that to your code, I can immediately see at least one major mistake. So look into it again, this time with a little more determination please.

Smajdalf

It looks like you are not using interrupts on the port expander and use it for inputs only. Why not using a shift register instead? Will probably be cheaper.
How to insert images: https://forum.arduino.cc/index.php?topic=519037.0

Go Up