go away spammer

Author Topic: Bricked my Robostix; How to make external clock?  (Read 4604 times)

0 Members and 1 Guest are viewing this topic.

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Bricked my Robostix; How to make external clock?
« on: March 16, 2008, 04:07:47 PM »
I bricked my robostix when I was setting the fuses.

I have to apply an external clock to pin 24 on the ATmega128 and choose external crystal in order to unbrick it.

Can anyone give me advise on how to make an external clock? I've never done this before in my life.

I already posted the question to the gumstix forum. http://docwiki.gumstix.org/Robostix_fuses

Thanks,
« Last Edit: March 16, 2008, 04:17:55 PM by vidam »

Offline Asellith

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
    • CorSec Engineering
Re: Bricked my Robostix; How to make external clock?
« Reply #1 on: March 16, 2008, 07:22:55 PM »
What clock speed do you need? Easy way is to get a resistor and capacitor network together and make an oscillator. Better way is to use a crystal but that probobly not the best option for you. I am assuming that this needs to be done only once. I'll look up the equations to calculate later unless someone beats me to it.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #2 on: March 16, 2008, 07:37:23 PM »
What clock speed do you need? Easy way is to get a resistor and capacitor network together and make an oscillator. Better way is to use a crystal but that probobly not the best option for you. I am assuming that this needs to be done only once. I'll look up the equations to calculate later unless someone beats me to it.

The AtMega 128 MCU operates between 0-16 MHz if that is what you need to know. I can check at work to see if we have any crystals available. I will need a 16 MHZ external crystal. The direction say to connect the clock to pin 24. I hope that is as simple as they state.

I was reading this manual by AVRFreaks http://www.avrfreaks.net/modules/FreaksArticles/files/21/Why%20you%20need%20a%20Clock%20Source.pdf

On page 6 says, "Get a TTL or CMOS level oscillator signal and apply it to XTAL1 (pin 24).  And try different sources of oscillators to get it reprogrammed.

I found some crystal oscillators with TTL and CMOS logic outputs that might work.

http://roson.manufacturer.globalsources.com/si/6008825644803/pdtl/Crystal-oscillator/1004827646/Crystal-Oscillator.htm

Hopefully we have these at work.
« Last Edit: March 16, 2008, 08:32:42 PM by vidam »

Offline Asellith

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
    • CorSec Engineering
Re: Bricked my Robostix; How to make external clock?
« Reply #3 on: March 16, 2008, 09:49:09 PM »
Do you have a function generator at home or work? You could just set a square wave ttl level signal at 16 MHZ into the clock pin and that should work just as well. Crystals usually need capacitors on them as well. Unless you get an oscillator. The cap values depend on the crystal my experience has been around 40 pf in parallel usually works good.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline frank26080115

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: Bricked my Robostix; How to make external clock?
« Reply #4 on: March 16, 2008, 10:04:15 PM »
you can always get another microcontroller to output a continuous square wave, but you need to lower the bit rate on your programmer

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #5 on: March 17, 2008, 05:29:02 AM »
Yeh I can get a function generator at work to generate a 16MHz continuous pulse at 5 Volts amplitude. I have to download AVR Studio to my desktop, move the function generator and the robostix near it, so I can also change the fuse setting while the pulse is being sent to the pin. It's a lot of trouble, but I guess that is the best option for me. I do have another microcontroller, but the first way is quicker at this point because that is where i spend most of my time during the week. Thanks for the tips.

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #6 on: March 22, 2008, 04:09:58 PM »
I used an oscillator SG51P and applied a 4.5 V amplitude to the input, and to OE (output enable). This went to pin 24 on the At mega 128 and gnd were tied through to pin 22 from the SG51P. I was still unable to change the fuse setting. The error said it was unable or failed to enter programming mode. I guess I killed the clock awhile ago. I will probably need to buy another micro-controller.

I will try to save the board by desoldering the atmega and replacing it on the board.



« Last Edit: March 22, 2008, 04:30:45 PM by vidam »

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #7 on: March 31, 2008, 01:33:44 PM »
I replaced the mega128 with the mega1651 on my Robostix. Reprogammed the fuses and success felt good; The fuses were set as the Robostix was able to enter programming mode and verify it. I'm back in business again.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Bricked my Robostix; How to make external clock?
« Reply #8 on: March 31, 2008, 01:44:27 PM »
hey vidam,

u really took a long way to get the right thing,

crystals would have worked fine with ur microcontroller u just needed to connect 2 capacitors most probably 33 pf between the leads of the crystal and then to ground

ALSO why didnt u try using the internal clock u could have saved time and money then  ;D
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #9 on: March 31, 2008, 01:47:53 PM »
You didn't read my previous post.

My previous post explains that I did try an external clock.

The results were the same. The microcontroller failed to enter programming mode. This means that I must have killed the clock.

So I had to replace the chip or scrap the old board.

Luckily a guy at work had some extra 128L and 1651 atmega's at home.

I also had to use specialized equipment at work to remove the broken 128 chip. A guy at work showed me how the machine works. It was pretty neat learning experience for me.

I have a full-time job and I am under no pressure to get this stuff done yesterday.

 

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Bricked my Robostix; How to make external clock?
« Reply #10 on: March 31, 2008, 01:51:20 PM »
u didnt killed the clock, u just messed up the fuse bits, atmega128 has a lots of fusebits to be changed for proper implementation.

if u do one mistake with fuse bits and u dont know the initial configuration, then ur mcu will be gone ,just keep a check on that on ur further projects and what kinda job u were talking abt??
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #11 on: March 31, 2008, 01:55:29 PM »
Is your post trying to be helpful?

Because I don't think this provides any added benefit except maybe to criticize.

in hindsight it is easy to criticize people for how they do things.

Also are you asking me what type of job I'm doing?

that isn't useful information for this post.

 



Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Bricked my Robostix; How to make external clock?
« Reply #12 on: March 31, 2008, 02:13:09 PM »
sorry man for that, i wasnt criicizing , i was just saying what u must have done, sorry again for making u feel bad  and abt the job i thought u were talking abt something else so my bad..
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #13 on: March 31, 2008, 02:16:27 PM »
Well it is hard to interpret people's writing styles and understand their intentions.

 I don't know about other people, but this is the second time I have misunderstood someone's post including yours.




Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Bricked my Robostix; How to make external clock?
« Reply #14 on: March 31, 2008, 02:25:50 PM »
hey it happens man dont take it too hard on urself, be cool , and my advice bfore changing fusebits u must be 300 % sure what u are doing otherwise say ur mcu bye bye.
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: Bricked my Robostix; How to make external clock?
« Reply #15 on: March 31, 2008, 02:29:48 PM »
Yeah, got it. I think I learned my lesson about setting fuses right. so I posted the question on gumstix newsgroup and this is a partial response:

"You should look at the datasheet and compare what you see in
AVR-Studio with the datasheet. Each and every fuse setting in AVR
Studio is documented in the datasheet."

So  I am going to read the datasheet front to back and set the fuses right for 1651mega chip.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Bricked my Robostix; How to make external clock?
« Reply #16 on: March 31, 2008, 02:32:10 PM »
yes do that that'll help a lot and always take a snapshot of what ur initial fuses were so that u can change them if u make any mistake
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Bricked my Robostix; How to make external clock?
« Reply #17 on: April 06, 2008, 12:31:00 PM »
hey superchiku . . .

ive mentioned this to you before but:
check your spelling
check your grammar
don't post unless you truely have something useful to say
don't post with a repeat of other posts

 ;)

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: Bricked my Robostix; How to make external clock?
« Reply #18 on: April 06, 2008, 12:34:59 PM »
iam not being harsh admin but where did i commit my mistake this time , do u think iam dumb or something...
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

 


Get Your Ad Here