1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC16F84A c-Code Help.

Discussion in 'Homework Help' started by Nestory, May 6, 2009.

  1. Nestory

    Nestory New Member

    Joined:
    Oct 15, 2008
    Messages:
    12
    Likes:
    0
    Hi!! am a student at a great East Africa University (University of Dar es salaam) taking a degree in electrical Engineering. So far am for my interest using PIC 16F84A as a beginner in PIC world. So am requesting you my dear members of Electronic project to help me develop a code that will process digital information according to the table below.
    This is the timber cutter machine cycles.
    This is how the pic port will be used
    PORTA
    RAo=Master switch
    RA1=Sensor1
    RA2=sensor2

    PORTB
    RBo=Roller drive
    RB1=Timber cutter
    RB2=Retractor(cut piece remover)

    The length of timber to be cut is the distance between the sensors sensor 1 and sensor2 (RA1 and RA2) the high bit indicate active process like when the timber block light over the photocell it i.e. sensor1 RA1=1 an so on.
    Here is everything in tabular explanation. Help me with a c-code according to the table below

    Input(PORTA)

    RA2 RA1 RA0
    0 0 0
    0 0 1
    0 1 0
    0 1 1
    1 0 0
    1 0 1
    1 1 o
    1 1 1





    Output(PORT B)

    RB2 RB1 RBO
    0 0 0
    0 0 1
    0 0 0
    0 0 1
    0 0 0
    0 0 0
    0 0 0
    1(RB2*) 1(RB1*) 0




    Blue font -when all sensors are HIGH and the switch is ON the roller RB0 will stop at FIRST actuate RB1* and DELAY for 20sec the actuate RB2* and lastly back to RED font state
     
    Last edited by a moderator: May 10, 2009
  2. blueroomelectronics

    blueroomelectronics Well-Known Member

    Joined:
    Jan 21, 2007
    Messages:
    12,536
    Likes:
    168
    Location:
    Toronto, Canada
    What code have you written so far?
     
    Last edited by a moderator: May 10, 2009

Share This Page