I have no external crystal oscillator (16Mhz) with my atmega88P after I burned the bootloader into it. I used my Uno atmega328P board to burn the bootloader to my plain atmega88P and it successfully burned. I placed atmega88P into my Uno board and I uploaded the led blinking example and it worked fine. However, I check the external 16Mhz crystal oscillator by oscilloscope and the signal just 0V. I wonder whether the bootloader when I burn is configured to run the internal clock instead of external. Anybody has any ideas why this happens.
Please help, big appreciated !!!
Thanks for your input. But when I put my atmega328P into my Uno board and checked the external crystal, I see 16Mhz sinewave. I expect to see the same crystal frequency (16Mhz sinewave) with my atmega88P when I put it into Uno board? Do you think atmega88P can work in Uno board? If yes, why did not I see the frequency?
Thanks again in advance for your kind explanation.
I need to have the precise external crystal oscillator for my project. Do you have any ideas how can I check with my atmega88P to make sure it using the external clock?
You may be able to feed the Osc to an external CMOS gate and use it to buffer the signal.
You could bend the osc pin 90' so it makes no connection. If things still work then the osc is not used.
[/What fuse values are you using for your ATmega88?quote]
to be honest, I do not know what fuse I am using for my Atmega88. I guess in order to run external clock, the Atmega88 has to see CKSEL is 0000. How do I check what the fuse I am using?
I still have the problem with external clock and would like to ask more input from you:
I know that after I burned the bootloader into my atmega88P and uploading the blinking example, I measured the blinking frequency and saw that 2 seconds on and 2 seconds off, but the blinking example code has one 1 second on and 1 second off. So it means that the atmega88P using its own internal 8Mhz frequency instead of external 16Mhz crystal. By the way, I used the atmega88P boards.txt as follow to burn the bootloader:
anybody knows what's parameters or fuses that I should change from boards.txt or any others files to make the atmega88P using an external crystal instead of its internal clock after burning the bootloader? Thanks in advance.
to be honest, I do not know what fuse I am using for my Atmega88. I guess in order to run external clock, the Atmega88 has to see CKSEL is 0000. How do I check what the fuse I am using?
sonh:
I need to have the precise external crystal oscillator for my project. Do you have any ideas how can I check with my atmega88P to make sure it using the external clock?
sorry for slow response. My objective is using the internal 8Mhz clock to upload the bootloader into atmega88P, but after it has the bootloader and I upload the code, then I put it in breadboard and connect pin9 and pin10 to external 16Mhz crystal, I power it up, then I should see it running with 16Mhz crystal clock instead or its own internal 8Mhz.
is this possible to do? if yes, can you help to give me some instruction or tutorial how to do this. I appreciate your help very much.
sorry for slow response. My objective is using the internal 8Mhz clock to upload the bootloader into atmega88P, but after it has the bootloader and I upload the code, then I put it in breadboard and connect pin9 and pin10 to external 16Mhz crystal, I power it up, then I should see it running with 16Mhz crystal clock instead or its own internal 8Mhz.
is this possible to do? if yes, can you help to give me some instruction or tutorial how to do this. I appreciate your help very much.
Only will work once with factory fuse settings. After you set for external xtal this will not work unless you put fuses back to use internal RC.
Only will work once with factory fuse settings. After you set for external xtal this will not work unless you put fuses back to use internal RC.
sorry I am still confused what you said. you mean because I am using 8Mhz internal clock during burning the bootloader, then after it has the bootloader, it will run at 8Mhz internal RC clock?
OK, we need a more detailed sequence of steps you wish to use.
Assumptions:
You are starting with a chip that it's fuse bytes set such that is using it's internal R/C clock source, speed does not really matter when burning a bootloader via using a ISP hardware programmer. I think factory default is internal R/C clock with divide by 8 option = 1MHZ clock.
You load a bootloader: How, with the Arduino IDE using a hardware ISP programmer, yes or no?
When you burn a bootloader from the arduino IDE the IDE selects what bootloader and fuse byte values to use based on the board selection menu you select. So as there are no IDE board types that use the atmega88p I'm not sure there is a valid way to use the IDE to burn the bootloader to your target. Only if you can determine that one of the older boards, like arduino N/G or older with ATmega8 bootloader and fuse byte values will work with your 88p.
Now if you know how to use AVRDUDE in it's standalone you could load your new bootloader file manually via command line mode, but that's beyond my experiance level to help. And that still leaves unanswered of what fuse byte values you need for your 88p chip. The IDE burns both the fuse bytes and bootloader when you use the IDE using fuse byte values stored in the board type selection entry in a file named boards.txt.
Is there a reason you have to use the 88p chip, it does complicate the whole process? Once you do get a bootloader loaded on the 88p chip, were you planning on using the the IDE to upload sketches to it? Again unless the 88p matches the old ATmega8 defined board there are bound to be other problems crop up.
Is there a reason you have to use the 88p chip, it does complicate the whole process?
my code size is around 6k to 7k and I can't use atmega168P or atmega328P because I don't want to add cost to my BOM.
Once you do get a bootloader loaded on the 88p chip, were you planning on using the the IDE to upload sketches to it?
yes. in fact, I already upload the blink example code, put it into breadboard, connect power 5V and ground to the chip, and pin9 and pin10 to 16Mhz xtal, and it works and blinking the led, but I measure the xtal clock by oscilloscope and see no clock. That's why I am seeking help to debug the external xtal clock since I need the precise clock for my application.
yes. in fact, I already upload the blink example code, put it into breadboard, connect power 5V and ground to the chip, and pin9 and pin10 to 16Mhz xtal, and it works and blinking the led, but I measure the xtal clock by oscilloscope and see no clock. That's why I am seeking help to debug the external xtal clock since I need the precise clock for my application.
any suggestions would be highly appreciate.
What board type did you use when you uploaded the blink sketch to the chip?