Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 19th January 2008, 10:09 PM   (permalink)
Default RA4 as an input on PIC16F688

Hello,

I'm trying to use PIN_A4 as the receive pin for a software UART with the ccs compilter. This was not working for me, so I'm trying to get PIN_A4 to work as an input of any kind.

The pin is normally floating high, but the MAX232 that is connected to it cannot seem to pull it low. I know the max232 is configured correctly, because if I simply move the input from A4 to C3, it works perfectly fine, however this is a last resort option, because I dont want to cut traces and splice wires on my PCB unless absolutely neccessary.

I've written a very basic application that just reads A4 and outputs the value to C2, which is a status LED on my board. This sort of works; if I short A4 directly to ground, the input is correctly read and my status LED goes out. I've tested it, and if the pin is pulled low with anything greater than about 300 ohms, it is not read correctly.

I've also made sure that the pullups on PORTA are disabled, but this doesnt seem to have an effect.

Here is my code for the test application:

Code:
#include <16F688.h>
#fuses INTRC_IO, NOWDT, NOPROTECT, NOMCLR, NOBROWNOUT, NOCPD, PUT, NOIESO, NOFCNEN
#device adc=10

void main() {
     set_tris_a(0xFF);
     port_a_pullups(false);
     while (true) { output_bit(PIN_C2,input(PIN_A4)); }
}
Stellarcore is offline   Reply With Quote
Old 19th January 2008, 10:41 PM   (permalink)
Default

I feel like an idiot.. figured it out.

It was a cold solder between the max232 and the PIC. lol.
Stellarcore is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 09:48 PM
Output = Input - Problems adamthole Micro Controllers 20 24th April 2007 04:09 AM
uuffff how doess this stupid ting work lol cyprio7 General Electronics Chat 7 9th October 2005 06:55 PM
Measure DC offset, Hum, DBs gain, Oscillation walters General Electronics Chat 21 7th June 2005 03:00 AM
convert input resistance to different output, but how?! pcoghlan Electronic Projects Design/Ideas/Reviews 7 9th July 2004 09:59 PM



All times are GMT. The time now is 12:18 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.