PIC16F84A c-Code Help.

Status
Not open for further replies.

Nestory

New Member
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:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…