PWM a LED with a PIC16F628A and control it with a PC (WIN XP).

     Communication trough RS232

 

         This is an example I made that shows you how you can PWM a LED with a PIC16F628A.
         You need the software "PAL" to control the circuit (PWM and on/off for LEDs)

         I made this example using only freeware (MPLAB and VB2005 EE).

        

         Feel free to test/use/distribute the PAL-software in any manner you like.

         If you distribute it, please link to this site (www.3mas.dnsalias.com).

 

Step 1:             Download “PAL.MSI” by clicking here. (Either “save” or “run”)
                        The program was written in VB2005 Express Edition.
                        Get your free copy of "VB2005 Express Edition" from Microsoft.
                       

                        If you want the VB source code, download it here.

 


Step 2:             If you saved it; Install by running the file (double click it).


Step 3:             Connect all wiring according to the diagram
                        (The diagram is found under “Menu\Schematics”)

 

 


Step 4:             Copy & paste" the source code from the program into MPLAB.


Step 5:             Build the source code in MPLAB. Make sure you select 16F628A as
                        your microcontroller.

 

Step 6:             Download to 16F628A using your favorite programmer software.

                        I use the “Winpic800”. Get your copy here.

                        Don’t forget to connect your programming device to your computer.
                        If you don’t own a programmer, you can always build one!
                        This one I really recommend:
                        http://feng3.cool.ne.jp/en/pg5v2.

 

                        This one I built;

 

                        Some hints when building the Multi Pic Programmer:

-          Check the pinout on the transistors.

-          The jumpers, don’t forget them.

 

                                Any questions or suggestions? Make a post in my Guestbook or send me an e-mail.