So, like all "beginners" are told to do, I start with THE blinker.
While everything runs smoothly with the 16F690, for any reasons, with the second chip, nothing does really work well (see comments in code).
Any clue why?
' both chip tested with 20MHz crystal#chip 16F690, 20'#chip 18F06Q20, 20#define LED PORTC.3' 16F690 = ok' 18F06Q20 = LED blinks but time (ms) is totally out of range - 10x..20x times slowerDo LED = 1 Wait 500 ms LED = 0 Wait 500 msLoop//' 16F690 = ok//' 18F06Q20 = no// Do// LED = !LED// Wait 500 ms// Loop
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try this and tell us what happens. Make sure that Vdd is tied to Vddio2 (Pins 1 & 8)
#Chip 18F06Q20, 20
#CONFIG FCMEN=ON
#CONFIG FEXTOSC=HS //' or try FEXTOSC=HS_24MHZ
#CONFIG RSTOSC=EXTOSC
Wait 100 ms
#Define LED PortC.3
Dir LED Out
Do
Set LED ON
Wait 500 ms
Set LED Off
Wait 500 ms
Loop
Edited to add additional option for FEXTOSC
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a whole suite of demos for this chip. See the demos folders. A quick search in GCCODE or Explorer for Q20.* will show 49 demos specific to this chip family. As the 16Q20 is the big memory version of the 06Q20 - the demos will work.
Specific to the Q20 and Q24 the VDDIO2 and/or VDDI03 power is require when using the power domain associated with VDDIO2 and/or VDDI03. The demo programs show this is required.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anobium, I have already powered the Q20 according to the DS. But there's no change at all.
Either download the latest demo pack or look on YouTube. I have also already been looking for examples but, sorry, can't seem to be able to find any of them 😔
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However none of these show the use of an external crystal or the any specific config settings that may be required for this range of chips. ( the default settings seem good)
As I previously noted, your code is missing the Dir command for the Port.pin
My suggestion (for testing) would be to use the internal oscillator and to also set the port direction( required).
If this works then your issue is related to either the missing PortC.3 Dir command or the external osc setup.
The DIR command won't change anything and I'm not yet sure how to set the external oscillator - I assume it is #CONFIG FEXTOSC=HS. I haven't been digging in the DS but right now, I don't know wath that config does #CONFIG RSTOSC=EXTOSC.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All of you give me infos where to find demo codes and examples and I'm still not able to find them.
To be fully honest, I'm completely confused in this SourceForge website. I hardly find my own threads, I don't find the directories you mention neither the files you're talking about. To me, the appearance of this forum is so different from all others that I'm quite lost and I apologize.
Where EXACTLY are the 49 files in GCCODE directory, where is "...Vendor_Boards\Great_Cow_Basic_Demo_Board\18Fx6q20_ChipRange_Demonstrations\" to be found???? Is it in this site or somewhere else?
It's frustrating seeing you wanting to help me and not being able to achieve such simple searches...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You may not have installed the Demos. We removed from the installation as requested by the users.
To install. Open GCSTUDIO and to the right of the About label there is 'Install or Update Demonstration Sources'. That will commence the download, when downloaded, install from your download directory. Does that work for you?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'd like to move from 16F690 to 18F06Q20.
So, like all "beginners" are told to do, I start with THE blinker.
While everything runs smoothly with the 16F690, for any reasons, with the second chip, nothing does really work well (see comments in code).
Any clue why?
Check out my Q20 demos.
Either download the latest demo pack or look on YouTube.
You need apply power to VDDIO2. The Q20 have two power domains. When using the 2nd power domain you must provide VDDIO2
Try this and tell us what happens. Make sure that Vdd is tied to Vddio2 (Pins 1 & 8)
Edited to add additional option for FEXTOSC
That code works!!!
The LED blinks with correct timing.
Either options #CONFIG FEXTOSC=HS or FEXTOSC=HS_24MHZ will work too.
After a few trials, those two lines are a must to make it work:
. #CONFIG FEXTOSC=HS
. #CONFIG RSTOSC=EXTOSC
Thanks a lot 😉
The config will have no impact as the chip is initialised without that config.
Post your GCB and ASM file. This makes little sense to me.
There is a whole suite of demos for this chip. See the demos folders. A quick search in GCCODE or Explorer for Q20.* will show 49 demos specific to this chip family. As the 16Q20 is the big memory version of the 06Q20 - the demos will work.
Specific to the Q20 and Q24 the VDDIO2 and/or VDDI03 power is require when using the power domain associated with VDDIO2 and/or VDDI03. The demo programs show this is required.
OP code is missing port direction for PortC.3.
Anobium, I have already powered the Q20 according to the DS. But there's no change at all.
Either download the latest demo pack or look on YouTube. I have also already been looking for examples but, sorry, can't seem to be able to find any of them 😔
The demos for the Q20 are located in the folder:
...Vendor_Boards\Great_Cow_Basic_Demo_Board\18Fx6q20_ChipRange_Demonstrations\
However none of these show the use of an external crystal or the any specific config settings that may be required for this range of chips. ( the default settings seem good)
As I previously noted, your code is missing the Dir command for the Port.pin
My suggestion (for testing) would be to use the internal oscillator and to also set the port direction( required).
If this works then your issue is related to either the missing PortC.3 Dir command or the external osc setup.
William
Here are my asm and gcb files
William,
Your code works perfectly; thank you.
If this works then your issue is related to either the missing PortC.3 Dir command or the external osc setup.
The DIR command won't change anything and I'm not yet sure how to set the external oscillator - I assume it is #CONFIG FEXTOSC=HS. I haven't been digging in the DS but right now, I don't know wath that config does #CONFIG RSTOSC=EXTOSC.
All of you give me infos where to find demo codes and examples and I'm still not able to find them.
To be fully honest, I'm completely confused in this SourceForge website. I hardly find my own threads, I don't find the directories you mention neither the files you're talking about. To me, the appearance of this forum is so different from all others that I'm quite lost and I apologize.
Where EXACTLY are the 49 files in GCCODE directory, where is "...Vendor_Boards\Great_Cow_Basic_Demo_Board\18Fx6q20_ChipRange_Demonstrations\" to be found???? Is it in this site or somewhere else?
It's frustrating seeing you wanting to help me and not being able to achieve such simple searches...
You may not have installed the Demos. We removed from the installation as requested by the users.
To install. Open GCSTUDIO and to the right of the About label there is 'Install or Update Demonstration Sources'. That will commence the download, when downloaded, install from your download directory. Does that work for you?
Just downloaded the file but I get an error (see attachment).
Maybe it's time for me to reinstall GCStudio as by default, in the root instead as \Program Files (x86)...
Yes, the default folders are always best for the 3rd party applications.
Okay, all demos are finally there! 👍
...and guess what? Here they are!!!
Thanks a lot for your patience 😉