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 !
 
Doesn't appear to be an Arduino sketch... What chip are you using??? Is the 7 segment on a shield?
 
It hasn't got a USB port.. The USB is connected via ttl->usb convertor... Are you using an external USB hub??
 
It is most probably caused by the MOSI and MISO on pins 12 and 13 also SS on pin 10.. where the USB shield is probably connected..

Why can't you use pins 0,1,2,4,
 
On the back of the Arduino is a six way header.. This houses SPI 2.. Can you use these pins???
 
In fact the analog pins are engaged even those except A5 that in fact i use instead of pin A11 or A12 or A13
 
What 7 segment shield have you got?? Using the two seial pins with shift registers may be a better option!
 
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.
 
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 **broken link removed** but in Europe and not in China, to not wait a month and even more
 
I make large displays 3' 1/2" character using 74hc595 and ULN2003 drivers...
 
Unfortunately currently I do not have much time to manipulate with electronic componentsto or create the pcb, even though I am equipped and at the moment It is better for me to buy a module already ready to be used like this **broken link removed**. If you know some shop in Europe, let me know
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…