RA5 on 16f88
Moderator: Benj
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
RA5 on 16f88
hi all can anyone tell me how to light a led on a pic16f88 on Ra5 using flowcode i have done a simple flowchart but cannot get a led to light can anyone point me in the right direction please many thanks
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
Re: RA5 on 16f88
Hi
Look at the data sheet 10-th page.
RA5 MCLR input only can be.
http://ww1.microchip.com/downloads/en/d ... 30487c.pdf
Look at the data sheet 10-th page.
RA5 MCLR input only can be.
http://ww1.microchip.com/downloads/en/d ... 30487c.pdf
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
ok thanks my mistake but i see that RA6 RA7 can be either inputs or outputs how do i configure the pic16f88 to use these as outputs, flowcode allows these to light leds but when i use hardware i cannot light these leds on these ports ???????, what am i missing
- 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: RA5 on 16f88
STibor is correct it's probably a config setting you are missing.
Are you using the matrix EB006 programmer or HP488 dev board, I think only v7 and v8 EB006 boards support the extra two I/O pins when the oscillator jumper is in the I/O position.
Are you using the matrix EB006 programmer or HP488 dev board, I think only v7 and v8 EB006 boards support the extra two I/O pins when the oscillator jumper is in the I/O position.
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
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
hi benj i am using a developement board from mikroelektronica EASY PIC 5 in all other respects the board is fine and i have checked the book that came with the board for config settings but cannot get to light a LED on RA6 or RA7 could you please suggest another PIC possibly 18 - 20 pin with at least 6 outputs on porta for 6 LEDS and enough outputs on portb to run a 2x16 lcd must also have ADC cheers
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: RA5 on 16f88
How are you downloading the hex file to your easypic 5 ?? i use an easypic7 can you post your flowcode file
attached is a hex file try it and see if it works it should flash all led's on port a
attached is a hex file try it and see if it works it should flash all led's on port a
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
hi dazz i use mikro-prog suite from mikroelektronica for downlooading HEX ive only done a simple flowcode program just to see if i can light LEDS on the desired outputs if i can get either of these outputs to work i shall create something i have in mind
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: RA5 on 16f88
Have you set up mikroeprog in flowcode
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
i have tried your HEX file but when i load it into mikro prog i get "error at line 23 line to short"
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: RA5 on 16f88
ok can you post your flowchart up
and try these config settings before burning your flowchart see if it works
and try these config settings before burning your flowchart see if it works
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
LED flashing on RA6
Last edited by siliconchip on Sat Jun 23, 2012 1:19 pm, edited 2 times in total.
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
looking closely at my board i have noticed that because i am using a 4MHz crystal this is connected to RA6 and RA7 on the 16f88, therefore i think i will need to use an internal oscillator on the chip to free these two ports up how do i initialise this timer through flowcode ????
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: RA5 on 16f88
To set the oscillator you will have to use a C code block to set osccon to the desires value.
For a 4 MHz clock enter the following in the C code block (remove all existing text):
Also in the processor configuration dialog of mikroProg set Oscillator to INTRC with both RA6 and RA7 as I/O.
For a 4 MHz clock enter the following in the C code block (remove all existing text):
Code: Select all
osccon = 0x60;
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
hi i have entered osccon = 0x60; as suggested , i notice on the data sheet that the following is said about internal oscillator "Internal oscillator block:
- 8 user selectable frequencies: 31 kHz,
125 kHz, 250 kHz, 500 kHz, 1 MHz, 2 MHz,
4 MHz, 8 MHz
what do i need to change in the c code to choose different frequencies
- 8 user selectable frequencies: 31 kHz,
125 kHz, 250 kHz, 500 kHz, 1 MHz, 2 MHz,
4 MHz, 8 MHz
what do i need to change in the c code to choose different frequencies
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: RA5 on 16f88
To select different frequencies change the value of osccon. See chapter 4.6.3 of the data sheet for the bits in the register.
The osccon values are:
0x70 : 8MHz
0x60 : 4MHz
0x50 : 2Mhz
0x40 : 1Mhz
0x30 : 500kHz
0x20 : 250kHz
0x10 : 125kHz
0x00 : 31.25kHz
The osccon values are:
0x70 : 8MHz
0x60 : 4MHz
0x50 : 2Mhz
0x40 : 1Mhz
0x30 : 500kHz
0x20 : 250kHz
0x10 : 125kHz
0x00 : 31.25kHz
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 392
- Joined: Wed Jan 05, 2011 11:24 am
- Has thanked: 101 times
- Been thanked: 24 times
- Contact:
Re: RA5 on 16f88
excellent thanks for the info i now can use RA6 and RA7 as outputs as well as internal oscillator thanks to all for your contributions