PIC12F683 AN3 not going low
PIC12F683 AN3 not going low
Good day all. I think I found a bug while using the PIC12F683. I have no problem setting Pin 2 Port A3 high(1), but for some reason It will not go low(0). When I tried to send a low(0), what happened is that the pin disconnects, no output at all. Could someone have a look into this. Thanks in advance.
Ondra
Ondra
- 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: PIC12F683 AN3 not going low
Hello Ondra
Pin 2 on the 12F683 is I/O pin GP5. Did you mean GP5 (pin 2) or GP3 (pin 4)?
Pin 2 on the 12F683 is I/O pin GP5. Did you mean GP5 (pin 2) or GP3 (pin 4)?
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
- 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: PIC12F683 AN3 not going low
Hello Ondra
Ok thats a strange one then. Are you definatley using the internal oscillator with no clock out setting in the chip configuration options. When you set the pin to logic 0 does it go into high impedance mode or does the pin simly stay at 5V? Do you have another 12F683 that you can test to see if it exhibits the same behaviour? The pin also function as as an input for the timer1 clock, I dont think this will be a problem but just out of interest are you using timer1 in your program?
Ok thats a strange one then. Are you definatley using the internal oscillator with no clock out setting in the chip configuration options. When you set the pin to logic 0 does it go into high impedance mode or does the pin simly stay at 5V? Do you have another 12F683 that you can test to see if it exhibits the same behaviour? The pin also function as as an input for the timer1 clock, I dont think this will be a problem but just out of interest are you using timer1 in your program?
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
Re: PIC12F683 AN3 not going low
Yes.Are you definitely using the internal oscillator with no clock out setting in the chip configuration options.
High impedance.When you set the pin to logic 0 does it go into high impedance mode or does the pin simly stay at 5V?
Yes, and I did and yes it did.Do you have another 12F683 that you can test to see if it exhibits the same behaviour?
No, I'm not using timer 1.The pin also function as as an input for the timer1 clock, I dont think this will be a problem but just out of interest are you using timer1 in your program?
Just for the record, I did set other pins on the port to 0 and they worked fine. I made a simple program just switching 3 pins to 0 and they all worked except GP5, Pin 2.
Ondra
- 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: PIC12F683 AN3 not going low
Hello Ondra
Im running out of ideas for this.
One idea is related to the power up time configuration setting. If this is enabled then maybe try disabling it just incase it is linked to the timer1 peripheral and the I/O pin.
The only other idea I have left is that the pin for some reason cannot sink current, I see no real mention of this in the datasheet but it might be worth a go. If you add say a 4.7K - 10K resistor between the I/O pin and ground then hopefully the pin should start behaiving as normal.
Let me know how you get on.
Im running out of ideas for this.
One idea is related to the power up time configuration setting. If this is enabled then maybe try disabling it just incase it is linked to the timer1 peripheral and the I/O pin.
The only other idea I have left is that the pin for some reason cannot sink current, I see no real mention of this in the datasheet but it might be worth a go. If you add say a 4.7K - 10K resistor between the I/O pin and ground then hopefully the pin should start behaiving as normal.
Let me know how you get on.
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
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: PIC12F683 AN3 not going low
What are your configuration settings (hex value) ?
Are you programming configuration settings via ppp and programmer or are you using Flowcode to set configuration settings via Chip configure e.g 0x2007,0xf98
If you could upload your Flowcode, I’m sure someone can solve the mystery.
Are you programming configuration settings via ppp and programmer or are you using Flowcode to set configuration settings via Chip configure e.g 0x2007,0xf98
If you could upload your Flowcode, I’m sure someone can solve the mystery.
Martin
Re: PIC12F683 AN3 not going low
Ok here is something else. When I output a 1. Using my multimeter I get a value of 2.11volts when I should be getting a value of 4.67volts. This value 4.67 is being output by the other pins.
Configuration settings via ppp and programmer
Here is a copy of the file. Thank for your help.
Ondra
Are you programming configuration settings via ppp and programmer or are you using Flowcode to set configuration settings via Chip configure e.g 0x2007,0xf98
Configuration settings via ppp and programmer
Here is a copy of the file. Thank for your help.
Ondra
- Attachments
-
- test.fcf
- (7 KiB) Downloaded 245 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: PIC12F683 AN3 not going low
If you are getting a lower than expected voltage, then either there is a extra load connected to pin dragging voltage down, or what is more likely, pin is not in a steady state, i.e it is oscillating and your meter is measuring the average D.C Voltage. that would suggest configuration requires a closer look. When you use ppp to program chip, what is the displayed config value?
Not had a chance to look at your program yet. Have you tried with a flowcode program with just 1 function and that is to put GP5 high, no timers running etc.
Not had a chance to look at your program yet. Have you tried with a flowcode program with just 1 function and that is to put GP5 high, no timers running etc.
Martin
Re: PIC12F683 AN3 not going low
There is no load connected to the pin. If your talking about Configuration words in the PICmicro configuration window. Then the value is 0x3FF4.
And Yes I tried creating a simple program just outputting a 1 and I got the same results.
Ondra
And Yes I tried creating a simple program just outputting a 1 and I got the same results.
Ondra
Re: PIC12F683 AN3 not going low
Good day Benj and medelec35 any of you got any further thoughts on this issue.
Ondra
Ondra
- 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: PIC12F683 AN3 not going low
Hello Ondra
I have one thought but you may not like it.
Throw the 12F683 in the bin and use a 16F88, they must be almost as cheap and they are a lot more reliable out in the field.
I have one thought but you may not like it.
Throw the 12F683 in the bin and use a 16F88, they must be almost as cheap and they are a lot more reliable out in the field.
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
- 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: PIC12F683 AN3 not going low
Hello Ondra
I have just tested a 12F683 device here on the matrix EB006 v7 board.
I used configuration setting 0x3ff4 and simply toggled the output on pin GP5 every second.
I then moved the OSC / A6&7 jumper to the A6&7 setting to disconnect the oscillator from the device pins.
The output for the GP5 pin is connected through to RA7 so I connected a LED E-Block to PortA and pin 7 is toggling correctly.
The output voltage is registered on my multimeter as 0V and 4.72V.
The main reason for my comments above is that the devices are quite unreliable when you are trying to reprogram them. IE they seem to break very easily. Therefore if you are designing application boards for a product then you may very well save time, money and hair by going for a device such as the 16F88.
I have just tested a 12F683 device here on the matrix EB006 v7 board.
I used configuration setting 0x3ff4 and simply toggled the output on pin GP5 every second.
I then moved the OSC / A6&7 jumper to the A6&7 setting to disconnect the oscillator from the device pins.
The output for the GP5 pin is connected through to RA7 so I connected a LED E-Block to PortA and pin 7 is toggling correctly.
The output voltage is registered on my multimeter as 0V and 4.72V.
The main reason for my comments above is that the devices are quite unreliable when you are trying to reprogram them. IE they seem to break very easily. Therefore if you are designing application boards for a product then you may very well save time, money and hair by going for a device such as the 16F88.
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
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: PIC12F683 AN3 not going low
Im with ben on this one. Config appears to be ok. You can really go wrong using flowcode and correct config. So doggy 12F683.
Martin