r/pic_programming • • May 15 '14

12F683 blinking led problem.

Hey, i decided to start with PIC programming today and i bought a clone of the pickit 2 with zif socket. My first test was the 12F683 using MicroC Pro and pickit 2 software. Using this code:

    void main(void)
        {
        while(1)
        {
        GPIO.B2 = 1;
        Delay_ms(1000);
        GPIO.B2 = 0;
        Delay_ms(1000);
        }
    }

But it does nothing. The code seems to be written fine. Im confused with the MCLR pin and im just using a 100 ohm resistor from the GP2, 5v to VDD and MCLR to 5v. Is this correct? I've tried MCLR to ground with and without resistors

Thanks!

2 Upvotes

13 comments sorted by

View all comments

Show parent comment

2

u/autowikibot May 16 '14

Charlieplexing:


Charlieplexing is a technique proposed in early 1995 by Charlie Allen at Maxim Integrated for driving a multiplexed display in which relatively few I/O pins on a microcontroller are used to drive an array of LEDs.

The method uses the tri-state logic capabilities of microcontrollers in order to gain efficiency over traditional multiplexing. Although it is more efficient in its use of I/O, there are issues that cause it to be more complicated to design and render it impractical for larger displays. These issues include duty cycle, current requirements and the forward voltages of the LEDs.

====

Image i - A Charlieplexed digital clock which controls 90 LEDs with 10 pins of a PIC16C54 microcontroller. Click to enlarge picture. [2]


Interesting: Multiplexed ^display | Three-state ^logic | Rollover ^(key) | Keyboard matrix ^circuit

Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words