Discussion in "PIC Microcontroller Discussion" started by    ponnus    Mar 29, 2014.
Sat Mar 29 2014, 06:39 AM
#1
Hai,
I am trying to use RA4 pin of PIC24F16KA101 as digital output.It is connected to one of the segments of the 7-segment display. But it is always giving a constant voltage of about 800mv. I am not able to drive this pin.

I checked the datasheet to know if it is an open drain, but that is not mentioned in the datasheet. I also tried setting it as open drain (ODCAbits.ODA4 = 1), and used a pull up resistor of 10K to Vcc(Vcc=3V). But still unable to drive it.

Does anyone faced such a problem?Any help is appreciated.....

Thank you
Mon Mar 31 2014, 02:50 AM
#2
Strange problem really... I checked datasheet to see if its an Analog pin but it is not. coz usually ports with analog function are analog by default and need to set as IO before using them. But this is not the case with RA4. Did you try replacing controller? also make sure that this pin is muxed with PDC3 so if you are in debug mode then probably it might now work.
 ponnus like this.
Tue Apr 01 2014, 01:12 AM
#3
Hai,
Thank you for the reply.
Actually it is multiplexed with these ,PGC3/SOSCO/T1CK/U2CTS/CN0/RA4, but I am not using any of these peripherlals.
I am using PGC2 for debugging, and I've disconnected all external hardware devices from this port, and also checked for short.

When I was unable to drive the pin just like other pins, I thought it is an open-drain output.
So, I tried using a 10k pull up resistor,but it didn't worked.
Then I've made it open drain by setting ODCAbits.ODA4 = 1; and enabled the internal pull up by setting the corresponding CNPUE1 bit, but still the same result.
I am using LAT register for outputting.
Still this pin is giving around 800mv.
Tue Apr 01 2014, 03:13 AM
#4
Even though you've said you are not using any other function on RA4, Still can you check in your program if you have configured Peripheral Pin Select (PPS) configuration for CN0 is not configured by any chance?
LAT or PORT you can use any register. PORT can be used for input and output both. LAT is only for accessing port latch register. I do not think it has anything to do with open drain. Try replacing your controller once.
Tue Apr 01 2014, 12:36 PM
#5
Hai,
Actually, in the I/O ports section of the datasheet, it says that this family does not support PPS configuration.
Also,I've checked all the peripheral module enable registers associated with the multiplexed peripherals while debugging. None of the enable bits are set.

The pic I am using is a new one and I've already soldered it into the board. Rest everything is working fine. Fortunately, I have two more I/O pins left on my controller and so now I am using another port pin.

I'll update if I'll get something about this.

Thank you
Wed Apr 02 2014, 01:34 AM
#6
I dont know.. but datasheet says look for PPS configuration. Strange! why they put this note if they do not support it

Do let me know if you find out something


[ Edited Wed Apr 02 2014, 01:35 AM ]

Get Social

Information

Powered by e107 Forum System

Conversation

Wed Mar 25 2020, 09:39 AM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 06:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 08:55 AM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 12:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 11:58 AM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 05:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 01:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.
Tue Jan 14 2020, 02:08 AM
shubham kharade
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me
Tue Dec 17 2019, 08:44 AM
Devangi
hello..i am programming industrial timer using 8051 with 24lc64 eeprom. i have query in storing the 3 diff value in eeprom with enter button. can anyone share c code ?
Tue Dec 17 2019, 05:30 AM
Andrius
Hello. Can anyone share the code in Bascon and scheme in Proteus?

Downloads

Comments

ukkorikerist
Thu Apr 09 2020, 12:05 AM
Oswaldrib
Wed Apr 08 2020, 11:08 PM
Rachelsig
Wed Apr 08 2020, 04:57 PM
Franksig
Wed Apr 08 2020, 03:38 AM
OliverKiz
Mon Apr 06 2020, 07:54 PM
Nikolaynom
Mon Apr 06 2020, 09:13 AM
Paulinewop
Sun Apr 05 2020, 10:33 PM
NormanJeops
Sun Apr 05 2020, 03:26 AM

Online

Guests: 68, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 01:37 AM

Members: 38149
Newest member: ukkorikerist
Forum Activity
PHANTOM28 Avatar
Posted By PHANTOM28
Fri Feb 28 2020, 10:25 AM
Hi.I hope you all can help me. I am relatively ne...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 21 2020, 05:05 PM
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Feb 21 2020, 04:45 AM
Yes you can do that.1. Create a channel @Thingspea...
ananyagupta Avatar
Posted By ananyagupta
Thu Feb 20 2020, 03:58 AM
With regards to the particular characters sent to ...
sarrahjuzar Avatar
Posted By sarrahjuzar
Wed Feb 19 2020, 04:24 AM
I have a gsm module sim900a and dht22 connected to...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 18 2020, 04:52 PM
figureyang Avatar
Posted By figureyang
Tue Feb 18 2020, 04:59 AM
figureyang Avatar
Posted By figureyang
Tue Feb 18 2020, 04:50 AM
wounder Avatar
Posted By wounder
Mon Feb 10 2020, 03:32 AM
From below sample code for nuvoton 8051 timer0 mod...
Just4Fun Avatar
Posted By Just4Fun
Sat Feb 01 2020, 09:20 AM
If you want to use a CH55x MCU there isn't any adv...