How to drive 7 segment using multiple ports?


Results 1 to 4 of 4

Threaded View

  1. #1
    guess79's Avatar
    guess79 Guest

    Default How to drive 7 segment using multiple ports?

    Dear All, How can I drive 7 segment display with 16F84 using multiple ports (portA.0~3 together with PortB.4~7)?

    e.g
    ' A0 : segment a
    ' A1 : segment b
    ' A2 : segment c
    ' A3 : segment d
    ' B4 : segment e
    ' B5 : segment f
    ' B6 : segment g
    ' B7 : segment decimal dot

    Can any one help me with the following code, please

    =================================
    digit var Byte
    mask var Byte
    i var Byte
    TRISB = %00000000
    TRISA = %00000

    loop:

    For i = 0 To 9
    LookUp, digit (0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f), mask
    "PORTA(A0~A3) + PortB(B4~7) " = mask <--------------- send mask munber to both portA+ portB; this is where i have problem!!!!!!
    pause 500
    Next i
    Goto loop
    end
    Last edited by guess79; - 11th December 2006 at 19:06.

Similar Threads

  1. LED Machine Tach For Tired Eyes
    By Archangel in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 27th January 2010, 14:55
  2. Replies: 1
    Last Post: - 6th April 2007, 10:50
  3. How do I drive 7 seg LCD with a PIC16f917
    By willemaajansen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd March 2007, 21:27
  4. 7 segment digit problem (using Mister E's code)
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th September 2005, 20:25
  5. WRITE not working
    By servo260 in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 29th December 2004, 02:02

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