Let's Make Robots!

Microchip and Seven Segment displ.

Hello Everyones,

I have now arradised more questionss about Microchip!

So this goes for those who worked with it or with the 4511b seven segment display controller.

I want to be able to display numbers from 2.2 to 12 with 2 seven segment displays. For this task I am planning to use two 4511b to reduce pin count. Now since I am a noob in this C language I would like some help for starting.

What would be a simple code to display a number on the display. I just need something to start with so I get an idea of what I have to do. Also if you know a forum where I can also ask about this please show me the way to it :)



(Using MPLAB and PIC16F886 could also be PIC16F887)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

What format is the number you want to display in to start with? Where are you getting the value from? Do you have any code at all yet?

You need to separate the number you want display into two parts, one digit for each display. Once you've got your two digits you can just send the 4 lowest bits to the 4 inputs on the 4511B (A, B, C, D).

At what point are you going to switch from 1 decimal place to 0 decimal place? 0.1 - 9.9 and then 10, 11, 12?

I want to make a "digital" voltage regulator.

I have a button, everytime you click it voltage goes up as the PIC changes the output making resistance lower and lower. So my idea was to add the display to sho the current voltage. The voltage is preset and goes from 2.2 to 12.

I would make it easier if I just wanted to display numbers and not wanting to display numbers and output a voltage to a transistor which then lets 12 v pass through a resistance making it lower.

No, I haven´t got any code thats why I am asking this question. I would like some help developing the code...

And please explain the part of sending the 4 lowest digits to the 4511b.


Get a basic program running first, blink an LED or something, you know the drill.

After that we can look at plugging in some functions to do the important stuff.

The truth table in the 4511B datasheet gives you all you need to know... the 4 A/B/C/D inputs give you the combinations required to display any number. I suggest starting with a little program that counts from 0 to 99, incrementing once a second or something, just to make sure you've got everything set up right.

Yes, I thought of that but I have serached how to make one blink but havent found any answers... Maybe I didnt search the correct way, do you know were I can find a code example?

And does code change within the different PICs or is it the same for all of them?

I used:


and the first useful hit was:


another was:


As to your question in the shoutbox about how to burn code via MPLAB, it really depends on what programmer you are using. If you are using a Microchip produced programmer, then setting up MPLAB to use it should be fairly straight forward. More information is really required to give a solid answer to how to program a PIC via MPLAB.

Thanks for the links Ill have a look, my problem with the programmer is that I bought a kit thats uses serial cable, the problem is there is no info on how to use it with MPLAB but currently in trying to use it with WinPic800, the programmer is supposed to be from New Electronics but it only says that and New Electronics doesnt seem to have it. Ill keep looking for it...


"UPDATE" I found it and it apparently is a JDM programmer, a more developed one I believe as it has more components and a ZIF socket.

this site when I was looking to see what components I would need to have connected to program a PIC.


The article mentions a JDM2 programmer and the video shows programming with a few different programmers and I believe the author uses WinPIC800 to program the PIC in the video.

I also thought I would point out that as mentioned in the article.  If you don't have a serial port, you won't be able to use a JDM style programmer as it uses the voltage differential from a hardware serial port.  Hardware serial ports use -12v for a '1' and +12v for a '0'. The low part count programmers use that differential to provide the VPP, programming voltage.

I have a serial port, but I checked voltages with my multimeter and its 8v for some reason when I was tld it has to be 13v to program, right?

Maybe when I send data it goes up, I don´t know but for now I can´t do anything as my PIC16F887 and PIC16F886 are unsuported by WINPIC800, MPLAB doesn´t support JDM...

But I did read somewhere that you could configure WINPIC800 to run with PIC16F886, but the link was broken.

Do you have any idea of how to configure it to do this?


The following website shows the software is indeed capable of programming the 16f886 and 16f887.


Are you using a laptop serial port to program? If so, I did run across one site that mentioned that laptop serial ports may not provide the voltage necessary to use a JDM style programmer.

I am using a Computer´s serial port

But you see, I have checked this site but the name is in blue there and in the programmer its in grey...

I´ve serached why but no one says why... Except for one forum that said grey names aren´t supported :(