pic16f877 led arrays project

Discussion in 'Embedded Systems and Microcontrollers' started by chaudhryali, Jan 15, 2011.

  1. chaudhryali

    Thread Starter New Member

    Jan 14, 2011
    Hi guys,

    m new to this forum and also new to the programming of pic's.i have a project in my mind and want to implement it as a my smester project in university.so i need help about how to start and what software and hardware tools i require.

    so my project is as follows :

    1.i want to programm a pic16f877 chip that will control array of leds and lcd

    2.there will be array of led's (e.g 7 led's)

    3.Then i write a programm in c that stores data into an array and show any array index that the user selects.and then the selected index of array should blink the coresspondence led and the value of that index of array should be displayed on an lcd that is on programmer borad.for e.g

    Arr[7]; // array that will contain 7 elements
    get the values for the array

    and then when to show the Arr[5]
    the 5th led should be on and the rest should be off.
    and i like to show it on an lcd e.g (arr[5] = 45 )

    Thats my project idea.but i don't know how to start it.what tools i require and software.

    i just have downloaded mplab and ponyprog.and i dont knw what to do with it.please help ..! thanks in advance:)
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    I'd suggest getting the PicKit2 and a demo board to start with, that's for programming the controller. There are several demo boards around, but you can get the programmer, board, and a PIC for under $50 in most areas.

    Next step is a compiler, I'm unsure if you know C or BASIC, but those are the common languages for PIC (unless you want to write assembly, which some do, but arrays don't fit the same in assembly). Hi-Tech C comes with MPLAB, C18 free version is available from Microchip (Works ONLY with PIC18 Devices). BoostC from Sourceboost and MikroC from Mikroelectronica are common as well. The above also offer BASIC language compilers.

    Once you have the compiler, hardware, programmer, etc. The first "Hello World" program is usually making an LED blink.

    The second "Hello World" program makes an LED blink faster or slower when you press a button.

    LCDs don't enter right away, as LCDs are picky about some timing issues, and you need to be aware of other things that would influence this, though the compilers do have LCD libraries that simplify the process.

    It's a GREAT hobby, with one demo board you can make thousands of different circuits. Add in a protoboard and you can make systems that weren't physically possible 30 years ago. It's a whole new area of electronics, mostly known as "Firmware". Hardware is the design and soldering of circuits, which you also should have a good grasp of, but isn't 100% required, just very strongly suggested.

    Sorry for rambling. Hopefully if you sift through the above, you might find something useful. :D
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    To control a large array of LEDs you might want to do Charlieplexing. There are a number of articles on it on the internet. Basically it allows you to control a large number of leds with just a few pins.
  4. chaudhryali

    Thread Starter New Member

    Jan 14, 2011
    thanks for the info but i have updated my project idea because it is to tough to handle the pic16f877 during runtime of c programm...now i need a help of how to control an array of led ..it is in programmer board,and m using mplab hi tech c compiler and ponyprog to burn it into the pic.

    so all i need is that how can i write a c programm to switch between leds that i want .for example from the hex keypad i press 1.when 1 is pressed the 1st led should be on and other leds should remain off..hexkeypad is included in my project.only i want to know how control individual led on the board..means the c programm ...thanks in advance:)