hi
im new to programming and have just got a v3 board. im trying to attach an external switch on port A. i have some code that if i press sw4 on portA rb0 is activated and also a display on the lcd screen, but now i want an external switch to do this, anyone know what code is needed to allow me to do this. by the way at the moment im using a PIC16f88.
thnks in advance
anyone know what to do for external i/p or o/p v3board
- 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:
You should be able to keep your code the same and just change the hardware to allow for the external switch. If you wire up your external switch as follows then the external switch will behaive like the switch on the board.
RA4---Switch---300R---+V
RA4---Switch---300R---+V
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
You can attach Ben's circuit to the RA4 screw terminal on the left side of the development board.
If you plan to use a switch in your own circuit (i.e. not using the dev board), then you will also need to provide a path to 0V for when the switch is not pressed (e.g. a 47k resistor between RA4 and ground).
If you plan to use a switch in your own circuit (i.e. not using the dev board), then you will also need to provide a path to 0V for when the switch is not pressed (e.g. a 47k resistor between RA4 and ground).