Switches issue?

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

Post Reply
alurosevic
Posts: 3
Joined: Fri Jan 22, 2010 9:25 am
Contact:

Switches issue?

Post 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?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Switches issue?

Post 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.

Post Reply