Hi everyone,
I'm searching for an equivalent command of the Picaxe "COUNT pin, period, wordvariable"
I looked at the "Pulsein" of GCStudio but it count the duration of the "High" state of a pulse and not counting
how many low to high pulse during a period.
Thank's for any tip.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi JB,
Did you find an answer to the counting of pulses problem ? I can be mistaken but it looks to me that GCB can only count duration of a pulse, it looks to me you are also looking for a count of pulses in a time frame ?
Willem
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe we change the compiler library to support the change of frequency so you do not have to edit the ASM.
The intent is have the compiler correct set frequency, however, for the some of AVRs this is not the case. Either because Hugh, now me, have no implemented or no one has asked or the Fuses set the frequency.
If it a very simple task to change the compiler to handle the frequency.
So, the intent is not to edit the ASM as you will need a load more tools, and, each time you compile it will revert the ASM.
I recommend resolving this rather than change the ASM.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
from the datasheet it's mention the external clock variation must be < 2% to be accurate, otherwise it can lead to unpredictable behavior.
Best way to it's to try.
I did search on the web and Microchip website, and, nothing on the Microchip forum ( all nine post regarding the ATTINY10!) I did not find any insights.
I have opened a ticket with Microchip to get clarification. Is the 12mHz the error ? or, 16mHz?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good help, tk's
my assumption is the datasheet refer to ( 0-16mHz) this could mean an external clock source from 0 to 16mHz max, and the chip will manage the speed grade as shown on page 2.
Hi everyone,
I'm searching for an equivalent command of the Picaxe "COUNT pin, period, wordvariable"
I looked at the "Pulsein" of GCStudio but it count the duration of the "High" state of a pulse and not counting
how many low to high pulse during a period.
Thank's for any tip.
See https://sourceforge.net/p/gcbasic/discussion/579126/thread/86047781/?limit=25#2ad5
Hi JB,
Did you find an answer to the counting of pulses problem ? I can be mistaken but it looks to me that GCB can only count duration of a pulse, it looks to me you are also looking for a count of pulses in a time frame ?
Willem
See https://sourceforge.net/p/gcbasic/discussion/579126/thread/86047781/?limit=25#2ad5
Also how to setup a ATTINY10 external clock source to use a 16MHz crystal.
Tk's
I found from the ASM file the register line:
ldi SysValueCopy,0 ; <-- if I'm right 0=internal 8Mhz and 2=external 16MHz x-tall
out CLKMSR,SysValueCopy
Maybe we change the compiler library to support the change of frequency so you do not have to edit the ASM.
The intent is have the compiler correct set frequency, however, for the some of AVRs this is not the case. Either because Hugh, now me, have no implemented or no one has asked or the Fuses set the frequency.
If it a very simple task to change the compiler to handle the frequency.
So, the intent is not to edit the ASM as you will need a load more tools, and, each time you compile it will revert the ASM.
I recommend resolving this rather than change the ASM.
That will be great to be able to setup between internal and external clock.
Thank;s for the tip.
I will add to the Backlog... meanwhile add this.
And, add this to your program.
I got a warning that 16mHz was too fast for chip. Is this true? What does the datasheet state ?
Hello,
from the datasheet it's mention the external clock variation must be < 2% to be accurate, otherwise it can lead to unpredictable behavior.
Best way to it's to try.
My question was about the max mHz of the chip. In the GCBASIC chip database it shows as 12mHz, so, your 16mHz will issue a warning.
It would be good to understand the max mHz.
You are 100% correct
I took from the table 7-1.
Ok. Max is 12mHz.
What is meant by 16mHz in 7.2 ?
Good question,
didn't find any documentation except from Atmel / Microchips.
I did search on the web and Microchip website, and, nothing on the Microchip forum ( all nine post regarding the ATTINY10!) I did not find any insights.
I have opened a ticket with Microchip to get clarification. Is the 12mHz the error ? or, 16mHz?
Good help, tk's
my assumption is the datasheet refer to ( 0-16mHz) this could mean an external clock source from 0 to 16mHz max, and the chip will manage the speed grade as shown on page 2.
I don't think that assumption is safe.
I would be guessing hence I opened the ticket.
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/ATtiny4-5-9-10-Data-Sheet-DS40002060A.pdf
Confirmed by Microchip support. Max frequency is 12 mHz. The latest datasheet has removed the reference to 16 mHz.
It's good to know, thank's