• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Problem with 7-segment display

Status
Not open for further replies.

mauros

Member
I built a (foot)controller to send midi messages via bluetooth to usb port of my guitar multifx and at a later time I wanted to add a 7-segment display to view the counter of the selected effect.

Unfortunately, in the sketch, after inserting

#include <SPI.h>
#include <Usb.h>
#include <usbhub.h>
#include <usbh_midi.h>
USB Usb;
USBH_MIDI Midi (& Usb);

the presence of the code
If (Usb.Init () == -1) {while (1);}

causes problems in displaying 7-segment display digits.

The display is this https://tinyurl.com/ku3cojj ( 2 digits in one )

The problem appears if i connect the 7 segments between pin 5 and pin 11 (driving digit 1 with pin 12 and digit 2 with pin 13), and at that point the digits are not well distinguished because the segments that should remain turned off remain turned on. Unfortunately, pins 0,1,2,3,4 are used for other purposes and I can only use from 5 to 13.

I tried to remove all the "include" mentioned above but only with the presence of the code

If (Usb.Init () == -1) {
While (1);}

the digits display is faulty !

However, if I disable the code
If (Usb.Init () == -1) {
While (1);}

i have no problems with the display BUT the controller does not work :-D

Can it be solved ?

Thanks in advance !
 

mauros

Member
In fact the analog pins are engaged even those except A5 that in fact i use instead of pin A11 or A12 or A13
 

mauros

Member
So far I've tried with a dual display with 7 segments shared, good only if I used pins 2,3,4,5,6,7,8 (9,10 for enable the two digits) but i had to handle the alternate 2-digit with switch on and off. I just got a 2-digit display with two 2x 74HC595.
It would be interesting to be able to use some pins of the USB Interface ICSP but I would not know how to do it.
 

mauros

Member
Today I wired two 74HC595 with 2 displays but after connecting a myriad of wires it did not work well and I disassembled everything, also because i had already made two pcb with 2 shift registers and one pcb with two transistors in multiplexing but i got the problems i have written here. I would like to be able to buy a module like this http://www.ebay.com/itm/401171797073?rmvSB=true but in Europe and not in China, to not wait a month and even more
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top