Free Project - 245 LED Display


Results 1 to 40 of 222

Threaded View

  1. #11
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi Magu,

    Paste the code below in the Windows editor "Notepad" and save the
    file using the name mblink.bas. Save the file in the folder where you
    have installed the demo of PicBasic Pro.
    (The default is "C:\PBPDEMO\").

    Code:
    ' File name: mblink.bas
    ' Target: 16f628A 
    ' Compile the file from the command line: pbpdemo.exe -p16f628a mblink.bas 
    '
    '                  +5V
    '                   |
    '                  _|_
    '                 _\_/_  LED 1
    '                   |
    ' RA4-----/\/\/\----+
    '         300 ohm
    '
    @   device pic16f628A, hs_osc, lvp_off, mclr_off, pwrt_on, cpd_off
    
    DEFINE OSC 10       ' 10 MHz crystal used.
    CMCON = 7           ' Disable comparator, set PortA in digital mode.
          
    OUTPUT PORTA.4      ' Set RA4 as output
     
    loop: LOW PORTA.4   ' Turn on LED 1, the pin RA4 sinks current.
          PAUSE 500     ' Delay for .5 seconds.
          HIGH PORTA.4  ' Turn off LED 1, the pin RA4 floats, (RA4 open drain output). 
          PAUSE 500     ' Delay for .5 seconds.
          GOTO loop     ' Go back to loop and blink LED 1 forever.
    END

    Open a command shell window, change directory to C:\PBPDEMO and type:
    pbpdemo.exe -p16f628a mblink.bas

    This will compile your program and you will get the HEX file MBLINK.HEX.

    Remove all the ICs from your board. With IC-Prog program the
    PIC 16F628A with the file MBLINK.HEX. Once you have done that,
    with IC-Prog VERIFY the chip. Once you are sure that the chip
    is programmed OK, plug the PIC in the socket 1 and power up the
    board. If everything is OK, you will see the LED 1 blink forever.


    (Click to enlarge the picture).

    Best regards,

    Luciano
    Last edited by Luciano; - 19th June 2007 at 11:19.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  3. Replies: 2
    Last Post: - 14th July 2008, 22:11
  4. 245 Led Matrix Display (as constructed by Magu)
    By magu in forum Code Examples
    Replies: 11
    Last Post: - 29th June 2007, 00:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts