If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Exactly! Do you have any knowledge how to bite m328?
For example the C++ instruction delay_us(30) on mega8 makes exactly 30us delay but on mega328 makes 33us!
I see that entire execution time on mega328 has minimal delay. Unfortunatelly the project is time sensitive.
At the end entire timing on mega328 goes to the deep forest...
I do no have any idea how to fight with it?
More necessary files is added to my repository http://chomikuj.pl/dantech/2nd+ChancePI
My knowledge is still at novice's level. I am still learning.
But i already tasted all the "beauty" of programming the 328P for delicate timing tasks!
For precise timings you will need to switch on assembler and forget about C language.
Good news though is in fact that you can mix assembler and C when necessary.
All depends on what tool are you using for writing code.
That's why i suggested Arduino, its IDE is allowing you all the possible "acrobatics".
I think Joop our colleague from forum here can say much more than me on that subject.
Let's invite him here to join.
BTW Joop's threads which i find as very informative:
Exactly! Do you have any knowledge how to bite m328?
For example the C++ instruction delay_us(30) on mega8 makes exactly 30us delay but on mega328 makes 33us!
I see that entire execution time on mega328 has minimal delay. Unfortunatelly the project is time sensitive.
At the end entire timing on mega328 goes to the deep forest...
I do no have any idea how to fight with it?
BTW. The next crystal with "nice" timer dividers is 18,432 but unfortunatelly using it will clock MCP3201 slower (2,30 MHz ADC clock - divider 8 for ISP) than 11,0592 (2,76 MHz ADC clock - divider 4 for ISP)
You can use pcb from original ChancePI. My hardware is a little bit simplified but PCB should be compatible (empty places for parts).
New schematic inside .zip file
At the moment I have some troubles with compiler and atmega328. the same code compile for m328 has some problems to keep proper timings.
Investigation in progress...
You can easily translate changelog.txt from Chance PI by google
I do not plan use 16MHz crystal because one do not allows "beauty" dividers for timers. Because of dividers issue the crystal 11,0592 is quite popular.
Oh i understand what are you saying!
"Mathematics" with interrupts at 328p is pretty awkward. Lot of troubles.
One of the tricks to do the job is exactly to "trim" the main clock with proper quartz and match the "mathematics" inside the code!
This project can gain a lot on popularity if it can be easy transfered to Arduino platform.
And there you have 16Mhz clock. A problem!
I am not informed; if quartz can be replaced at Arduino directly?
Anyway... this is interesting enough as it is now.
You can use pcb from original ChancePI. My hardware is a little bit simplified but PCB should be compatible (empty places for parts).
New schematic inside .zip file
At the moment I have some troubles with compiler and atmega328. the same code compiled for m328 has some problems to keep proper timings.
Investigation in progress...
You can easily translate changelog.txt from Chance PI by google
I do not plan use 16MHz crystal because one do not allows "nice" dividers for timers. Because of dividers issue the crystal 11,0592 is very popular and cheap.
At the moment the code is practically rewritten by me, timings are changed and some hardware changes are issued also. Since now my releases
will be called "2nd ChancePI" to distinguish from base project called "Chance PI"
I have to point out that every my software release has roots in the project called ChancePI/AndyF.
Splendid job!
I am interested to see the details, can you write changelog in English?
I see 11.0592 quartz on schematic... is it easy obtainable?
What are the chances your code to be adapted for Atmega328P and 16Mhz clock?
Cheers!
At the moment the code is practically rewritten by me, timings are changed and some hardware changes are issued also. Since now my releases
will be called "2nd ChancePI" to distinguish from base project called "Chance PI"
I have to point out that every my software release has roots in the project called ChancePI/AndyF.
Leave a comment: