Matrix _16f877 need help, please


Results 1 to 12 of 12

Threaded View

  1. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi MINHLE,
    try this
    Code:
    ADCON0 = 0
    ADCON1 = 7
    
    A VAR BYTE
    
    PORTB = 0 ; SET PORTB AS OUTPUT
    PORTC = 0 ; set port c as output
    trisB = %00000000 'all ports B as outputs
    TrisC = %00000000 'all ports C as outputs
    
    PORTC.1 = 0 ; set port C1 to low wich enables leds ground pin
    CCP1CON = 0 ' turn off CCP Module which affects portC
    pause 300
    
    LOOP:
    FOR A = 0 TO 8 'loop to repeat
    PORTB.0 = 1 'set port B0 to high, turn on led
    PAUSE 500
    PORTB.0 = 0 ; set port B0 to low, turn off led
    PAUSE 300
    NEXT A
    
    GOTO LOOP ' Flash forever
    END
    The only difference is I set Tris registers and disabled Capture Compare Module. and turned off A/D converter. Now how have you set your config fuses? You have specified 20 mhz and this will not work with the default config statement found in the C:\PBP\16f877.inc file.
    Last edited by Archangel; - 5th February 2009 at 03:17.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. led matrix pic 16f84 and 4017 help me please
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 5th February 2011, 00:06
  2. RGB LED Matrix
    By ERIK in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 28th June 2008, 07:01
  3. LED Matrix Question
    By mekohler in forum Schematics
    Replies: 28
    Last Post: - 29th September 2007, 13:12
  4. 4x16 Dot Matrix LCD control is possible?
    By muskut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st September 2005, 09:56
  5. need help with switch matrix
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th January 2005, 18:59

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