>hello to all,
>
>I am working on a simple test program in assembly language to test run my
>robot. Here is the simple sequence I desire to have
>
>1) Robot starts, move forward
>2) Hit or near an object/wall, it will trigger the contact / IR sensor
>which
>is connected to one or more of the input pins
>3) It will change the input state from '0' to '1' (I have build a
>simple
>switch circuit to provide 5V to the input pin if the contact is made)
>4) When the MCU 'sensed' the change in state (by polling I suppose),
>it will
>then output 2 ENABLE pins to '0', commanding both motor to stop
>5) Then next step is a '0' to DIR1 of one side, a '0' to DIR2 of the
>other
>side of the motor, hence reversing the robot
>6) Followed by outputting '1' to DIR1 and '0' to DIR, turning the
>robot to
>the right (avoiding the object)
>7) Move forward again
>8) Goes on and on.
>
>does anyone have a similar assembly code for PIC16f877 that does similar
>things?
>
>Henry
>
>--
>
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
>email
.....listservKILLspam
@spam@mitvma.mit.edu with SET PICList DIGEST in the body
1