Berkey
Posts: 1
Joined: Wed Mar 11, 2015 10:52 am

4 7 segment LED display

Wed Mar 11, 2015 10:57 am

Hi all.

I'm looking for a tutorial to wire and program a 4 7 segment LED display. Can anyone provide me it?

Thank you in advance.

180degrees
Posts: 5
Joined: Tue Mar 10, 2015 6:20 pm

Re: 4 7 segment LED display

Wed Mar 11, 2015 4:02 pm

I would suggest that you go to Adafruit (.com), and check out their very rich source of RPi tutorials.
If you don't find what you're looking for, ask on their forum.
These people are extremely knowledgeable regarding things Pi, and very helpful.

Oh, and by the way: forget any and all thoughts of writing your program in RPi assembly language. It ain't gonna happen, no matter what you read in these forums. If it were possible, you could easily buy an Assembler for the RPi's ARM chip, or get one free. The only way to get an Assembler from Broadcom is to sign an NDA (Non-Disclosure Agreement) WHEN you sign a contract to buy a ton of their chips.
ANYone who says you can write assembly language using Raspbian simply doesn't understand any of the process of writing assembly language.

Sanity check: when you go to Adafruit to check out their really neat products, ask them about buying an Assembler for your Raspberry Pi. Be sure and state that you are not interested in writing faux assembly code which requires an operating system in order to work.
Hope you--and many others--have found this enlightening.
Warmest regards...

@Berkey--

Please notice that all (negative) responses to my comments regarding the difficulty involved in writing RPi assembly language did NOT give YOU any concrete information as to where, or from whom, to procure the requisite tools (Assemblers, Cross-Assemblers, IDEs, and the like) which any assembly-language programmer expects to have readily available in order to do serious assembly-language programming.
This is one of THE major problems with forums such as these: people quick to point out problems with a premise, but totally lacking in any solutions.
Last edited by 180degrees on Sun Mar 15, 2015 2:57 am, edited 1 time in total.

User avatar
scidata
Posts: 92
Joined: Tue Jan 06, 2015 4:21 pm
Location: Toronto
Contact: Website

Re: 4 7 segment LED display

Wed Mar 11, 2015 4:15 pm

Here's a tutorial and video, but the last time I did this was with a KIM-1 ~1978 !
http://razzpisampler.oreilly.com/ch09.html
"Self-education is, I firmly believe, the only kind of education there is" - Isaac Asimov

vsiles
Posts: 41
Joined: Wed Feb 04, 2015 10:04 am

Re: 4 7 segment LED display

Wed Mar 11, 2015 4:16 pm

What do you mean by RPi assembly language ? There is nothing preventing anyone to write bare metal programs for the RPi using arm11/armv7 asm syntax, we are several people here doing this on a daily basis. Correct me if I'm wrong, but the only thing you'll need an NDA for is coding for the GPU.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: 4 7 segment LED display

Wed Mar 11, 2015 5:14 pm

180degrees wrote:It ain't gonna happen, no matter what you read in these forums. If it were possible, you could easily buy an Assembler for the RPi's ARM chip
You can. There are a number of very good commercial ARM assemblers which target both the original Pi's 1176jzf-s and the Pi 2's Cortex-A7. Suppliers who spring to mind are ARM Inc, IAR and Microsoft.
180degrees wrote:or get one free.
Likewise, there are a number of very good free ARM assemblers, under a variety of licenses. GNU's assembler, part of the GNU binutils, FASMARM, vasm, the RiscOS assembler, etc.
180degrees wrote:The only way to get an Assembler from Broadcom is to sign an NDA (Non-Disclosure Agreement) WHEN you sign a contract to buy a ton of their chips.
I suspect you're referring to the videocore toolchain, and you probably won't get that with an NDA either, although you might get help from Broadcom in customising the videocore firmware if you're buying a shedload of chips. Ironically, you *can* get a number of more or less functional, free videocore toolchains.
180degrees wrote:ANYone who says you can write assembly language using Raspbian simply doesn't understand any of the process of writing assembly language.
Image

baantonia
Posts: 63
Joined: Fri Feb 06, 2015 2:19 pm

Re: 4 7 segment LED display

Tue Mar 17, 2015 7:43 am

After making a LEDs flash (bare metal, no OS, with a library of routines I wrote in the GNU assembler to interface with the GPIO), I'm now up for using a MAX7221 chip. I've coded an SPI driver as a module for RiscOS (in assembler) which interfaces with the Gertboard ADC SPI chip, with success. So the challenge is to use two SPI devices, one to do the ADC conversion, the other to display the result, all bare metal and written in the GNU assembler tools. I've started writing the support routines to convert to BCD but they haven't been tested. A long way to go but feeling positive, it will be accomplished.

Return to “Bare metal, Assembly language”