I'm not famliar with using Basic on a PIC, but the '877A boots up with Port A pins
all set to analog, and need to be changed for use as digital pins. I don't know if
"ALL_DIGITAL = True" actual does this for Port A. In any case, you might try using one
of the Port B or C pins for the input.
Also, there is no indication in your code what the various configuration fuses are set to,
nor what the oscillator setting is. Maybe the compiler takes care of that automatically,
I don't know. Is this a Picaxe, or what?
those are not my full codes, i just posted parts of the code.. im using proton basic..
im using xtal osc 4mhz, and using "ALL_DIGITAL = True" really changes the pins to digital..
these are my pin configurations:
arduino - pic - purpose
digital 13 - PORTA.3 - Send Signal To PORTD[Output Pin] To Turn Left Motor On/Off
digital 12 - PORTA.2 - Send Signal ToPORTD[Output Pin] Output Pin To TurnRight Motor On/Off
A circuit diagram would help.
The 16F887 code seems to be some kind of combinatorial logic that needs combinations of input pins to do anything.
Are all the pins that are defined as inputs connected to something?
yes all the pins are defined as input, its in the codes i posted
TRISA = %111111, 1 is for input 0 is for output..
im working on doing a circuit diagram,..
its been christmas vacation so ive been busy with family matters..
Test the arduino and pic individually to make sure that they behave as expected, then connect them together.
Otherwise, you don't where the problems are.
ive doing this right now, ive tested arduino and its working fine..
gonna test my pic16f877a next, but i believe the problem lies on the signal..
im thinking if i should use a switching transistor..
im currently using this wiring: but ill try using a 2n3904 transistor: