Problem with some ports

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Erik-Odinsvej
Posts: 20
Joined: 21 Jan 2008 21:37

Problem with some ports

#1 Post by Erik-Odinsvej » 07 Jan 2022 18:23

Hope I can get help with an issue I have with different pic ic

Example: I want to use IC PIC16F688 for an project, I can use all ports except bit 4 and 5 of port A , I know that those pin is normally for a crystal or other means for providing a clock, but in my case it is set to
"INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN pin" as I use internally clock, but the two pin will not work as I/O for some reason, I have same problem with others processors but in this project I really need all pin to work, I have tried to disable some function Like:
CMCON0:=%000111;
ANSEL:=0;
WDTCON:=0;
CLRWDT;
INTCON:=0; //disable interrupt
T1CON:=0; // disable timer
OPTION_REG :=0; // Timer0 settings

But still no success

Is there anyone there can help ?
I use MikroPascal on EasyPic5 board

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Problem with some ports

#2 Post by janni » 07 Jan 2022 18:56

With proper setting of configuration register these pins probably work but you do not have access to them on EasyPic5 PORTA header due to oscillator jumper setting. Check the manual how to set the appropriate jumper to connect RA4&5 from processor to header and LEDs instead of the quartz crystal.

Erik-Odinsvej
Posts: 20
Joined: 21 Jan 2008 21:37

Re: Problem with some ports

#3 Post by Erik-Odinsvej » 07 Jan 2022 19:13

Thank you so much - I change the Jumper for A4 and A5 for oscillator and It worked !

Your made my day ! - I have used so much time on this.

Regards Erik

Post Reply

Return to “mikroPascal PRO for PIC General”