seven segment display

Started by mauricio, May 06, 2014, 06:17:28 PM

Previous topic - Next topic

mauricio

hello

I'm trying to implement a seven segment display on an A13

I did it already with arduino, using SoftwareSerial.h library, but I can't find any info about how to do this with an olimex board

I'll appreciate any advice

regards and thanks in advance

JohnS

Bare metal? An OS - which?

John

mauricio


MBR

You need only GPIO support (already included in default kernels). Connect the display with GPIO2 via some buffer ICs and drive it directly by working with GPIO sysfs interace. If you need to drive more than one digit, I recomend including BCD to 7-segment decoders, if you use CMOS ones (not 5V TTL ones), you can drive the decoder directly, because CMOS ones work with 3.3V.

mauricio

hello & thanks

I'll give it a tray

I guess that by using just GPIO I need a pin for each segment ? is that true ?, so if I have four digits I'll need 28 pins ?

MBR

#5
Quote from: mauricio on May 08, 2014, 07:15:13 PM
I guess that by using just GPIO I need a pin for each segment ? is that true ?, so if I have four digits I'll need 28 pins ?

Only if you will drive it directly (and you need buffer/driver ICs anyway, because large LED displays require tens, even hundreds of miliamps, far beyond maximal output of GPIO pins). But if you use BCD to 7-segment decoder IC, you will need only four pins plus one extra pin if you want to turn all segments off (some BCD decoders don't have "empty" symbol). So if you don't need displaying decimal dots or such, you will need only 16 pin to drive four digits and the CMOS version inputs can be driven directly from pins, without driver/buffer ICs.

And if you use decoder with some kind of latch/input buffers (4096 from CMOS 4000 series seems to have them), you can multiplex them on same input pins, so you will need only 8 pins (4 for BCD, 4 for multipexing) and if you add one aditional IC (1-of-4 decoder/multiplexer), you will need 6 pins only.

dave-at-axon

Also have a look at the MAX7219 as this can drive 8 digits and easy control from SPI, even simple bit banged SPI works well with this device.

mauricio

I'm sorry by misleading this. I did not mention that I'm using one of the sparkfun seven segment serial display (https://www.sparkfun.com/products/11442), which I suspect is ready for use because I see it has an ATMega328 attached

so I think this changes the approach I need to take. I suppose I just need to write to a serial port

I've looked around for this but I'm confused about UART, UEXT stuff ... which and how to use them, even if I need to

I would like to use one of the 10 pin IDC sockets (GPIO1 or UEXT) because that's the cable I have

I'll appreciate any guide, sorry again and thanks for all comments

dave-at-axon

UART or I2C will work. Both should be on the UEXT connector but I am not familiar with the A13 directly but UEXT should have both those to choose from.