HELP with PORTA PIC 16F628A


Closed Thread
Results 1 to 3 of 3
  1. #1
    jams90's Avatar
    jams90 Guest

    Question HELP with PORTA PIC 16F628A

    Im newbie to microcontrollers and picbasic and i'm trying to drive a simple 5x7 led matrix with an 16f628A, i connect the PORTB to the rows and PORTA from PORTA.0 to PORTA.4 to the columns

    but the 5th column doesn't show anything.
    It's a single 5x7 led matrix.

    here's the code:

    DEFINE INTOSC
    TRISA=0
    TRISB=0
    loop:
    PORTA.0 = 1
    PORTB = %01111110 'COLUM DATA
    pause 2
    PORTA.0 = 0
    PORTA.1 = 1
    PORTB = %01111110
    PAUSE 2
    PORTA.1 = 0
    PORTA.2 = 1
    PORTB = %00000000
    PAUSE 2
    PORTA.2 = 0
    PORTA.3 = 1
    PORTB = %01111110
    PAUSE 2
    PORTA.3 = 0
    PORTA.4 = 1
    PORTB = %01111110
    PAUSE 2
    PORTA.4 = 0
    GOTO loop
    END


    i know it could be made easier but im just experimenting with PICBASIC


    I wanna make PORTA all DIGITAL OUTPUT


    can someone help me?

    i just wanna make it show "TE AMO MAMA" letter by letter on the 5x7 led matrix

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: HELP with PORTA PIC 16F628A

    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: HELP with PORTA PIC 16F628A

    Your column 5 doesn't work simply because PortA.4 is a Schmitt Trigger
    input and an open drain output. You will need an additional NPN transistor with a pull down resistor to make column 5 working.

    Cheers

    Al.

    PS adding CMCON = 7 on top of your code, will disable the comparators function.
    Last edited by aratti; - 13th February 2011 at 08:47.
    All progress began with an idea

Members who have read this thread : 1

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

Tags for this Thread

Posting Permissions

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