Page 1 of 1

Switches issue?

Posted: Fri Jan 22, 2010 9:49 am
by alurosevic
Hi, im still quite new to flowcode v3 so im guessing im doing something wrong.

Basically im making some code to produce an LCD display thats controlled using different inputs to the P16F873. What i have set up is an LCD display that comes on when a switch is "read as high". Im storing it in a spare variable and connecting it to the correct port and bit on the PIC. Running the simulation works perfectly (press the switch, LCD is initialised). However when i complile to .hex and program with MPLAB nothing happens when i apply 5v to the correct bit on the pic (makes the switch).

The LCD programs and works fine without the switch.

Is there another way to simulate inputs to the pic?

Re: Switches issue?

Posted: Fri Jan 22, 2010 10:17 am
by Benj
Hello

It sounds like there maybe something wrong with your switch hardware, do you have a multimeter that you can use to confirm that the switch is pulling the input pin both to 0V and to 5V when pressed? Eg switch between uC pin and 5V and a pull down resistor between the uC pin and ground.

If the LCD is running fine normally then it sounds like your configuration and clock speed is defined correctly in Flowcode so the switch should be working.