answersLogoWhite

0


Best Answer

#include <p18f4580.h>

#pragma config OSC = IRCIO67

#pragma config WDT = OFF

#pragma config LVP = OFF

#pragma config PBADEN =OFF

#define Q1 PORTDbits.RD0

#define Q2 PORTDbits.RD3

#define Q3 PORTDbits.RD1

#define Q4 PORTDbits.RD2

#define SW1 PORTBbits.RB1

#define SW2 PORTBbits.RB2

#define SENSOR1 PORTBbits.RB3

#define SENSOR2 PORTBbits.RB0

void main()

{ TRISB = 0;

PORTB = 0;

TRISD = 0;

PORTD = 0;

while (1)

{

if ((SW1==1)&&(SW2==0)&&(SENSOR1==0)&&(SENSOR2==0))

{

Q1=1; //clockwise

Q4=1;

Q2=0;

Q3=0;

}

else if ((SW1==0)&&(SW2==0)&&(SENSOR1==1)&&(SENSOR2==0))

{

Q1=0;

Q2=0;

Q3=0;

Q4=0;

}

else if ((SW1==0)&&(SW2==1)&&(SENSOR1==0)&&(SENSOR2==0))

{

Q2=1; //counter clockwise

Q3=1;

Q1=0;

Q4=0;

}

else if ((SW1==0)&&(SW2==0)&&(SENSOR1==0)&&(SENSOR2==1))

{

Q1=0;

Q2=0;

Q3=0;

Q4=0;

}

}

}
User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Flow chart on steps of microprocessor programming for students project?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you give me a question using the word CHART?

what chart did u you use in the project


What is experiment in science?

It is a graph, chart, or pictures in a science project to prove that you did the project.


Does a science project have to have a chart or graph?

if you do you will have good impression on the person whom you are giving your project


What is needed when programming a computer?

A flow chart, debugging, computer language, and Hopper.


What is the advantages of a pert chart?

Advantages of a PERT chart is that it's a great mean for visualizing and communicating progress on projects. They usually help the Project Manager to better manage the project.


Is there a conversion chart to show microprocessor speeds?

No there is no chart unless someone took the time to make one and put it out on the web. Microprocessor speeds are on the CPU. There are only 2 major companies that make microprocessors, Intel and AMD. So go to there web sites and look for a list of Microprocessors and it will show you the speed of each.


Least needed when programming a computer?

A flow chart, debugging, computer language, and Hopper.


Is least needed when programming a computer?

A flow chart, debugging, computer language, and Hopper.


What is LEAST needed when programming a computer?

A flow chart, debugging, computer language, and Hopper.


Which control chart used for track the rejection in the maintenance project when the bug arrival pattern is not constant?

P Chart.


Which control chart would you use to track the rejection in a maintenance project when the bug's arrival pattern are not constant?

U Chart


What is the C programming of check the prime number with flow chart?

flow t prime numberchar