element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino IDE vs DigiSpark issue
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 8 replies
  • Subscribers 389 subscribers
  • Views 1844 views
  • Users 0 members are here
Related

Arduino IDE vs DigiSpark issue

tm_stump
tm_stump over 3 years ago

I've been looking for information about a small problem I encountered programming a Digispark board (attiny85) using the Arduino IDE and a Pololu pgm04b programmer.  The setup works without having to burn a bootloader to the digispark, but here is the issue.  If I upload the sketch using the digispark 1 or 8 Mhz board choices, the program runs as it should with no problems.  If I use one of the 16 or 16.5 MHz choices, the program runs extremely slow with maybe some other problems as the counter built in to count button pushes doesn't update.  I'm trying to find out what changes, exactly, are being made during compilation that provides a defect in the compiled program when using the higher speed choices.  I'm no expert, but I'm hoping that someone is aware of something I may be overlooking.  To throw a wrench into the works I might mention that this appears to be digispark clone so it's entirely possible that the ATtiny85 used on the board is not only not up to par but I guess there's a possibility it's not a genuine ATtiny.  I have some plain ATtiny85 on the way to try this without the digispark hardware overhead.

The sketch/program is just a simple program to count momentary button pushes, display the button push counts and allow an LED to blink on even numbered counts.

thanks,

TM

  • Sign in to reply
  • Cancel

Top Replies

  • tm_stump
    tm_stump over 3 years ago +3
    OK, I think I found the issue but I can't explain why this happens. The first and working board (digispark clone) compiled as a 16Mhz board had the Lfuse set to disable the clock divider CKDIV8 fuse, Lfuse…
  • wolfgangfriedrich
    wolfgangfriedrich over 3 years ago in reply to tm_stump +2
    Consulting the datasheet, there are 2 versions of the attiny85. The ATtiny85 which is spec'ed up to 20 MHz and the ATtiny85V which is specified only up to 10 MHz. I would be surprised that a clone would…
  • wolfgangfriedrich
    wolfgangfriedrich over 3 years ago in reply to tm_stump +1
    That is some nice debugging there. I only remember that Atmel Studio programmer had separate panels for programming fuses, EEPROM and Flash; but that was for a different chip. The Arduino IDE might not…
Parents
  • wolfgangfriedrich
    0 wolfgangfriedrich over 3 years ago

    This is just a guess and I did not read the datasheet, sometimes higher clock speed are only possible at either the high or low end of the voltage range of a chip. So it might do 16 Mhz only at 3.3 V or 5 V and your board is running on the wrong voltage. 

    Or if your text is correct and the board is running at 16 mHz, everything is running at milliHz speed. Rofl

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tm_stump
    0 tm_stump over 3 years ago in reply to wolfgangfriedrich

    Thanks for the reply.  Just a typo, should have been Mhz.  Easy enough to try a different voltage.

    (added) Just varying the voltage has no effect on the problem.  Out of 5 Digispark clones, 1 appears 'normal' and 4 appear 'not normal'.  My #1 guess is that using the Digispark 16/16.5 Mhz board definitions generates code with a problem for these board or they're just plain defective at the higher speeds.  Is it possible that there is some built-in delay to make the Digisparks work OK but get out of control with the clones?  

    TM

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • tm_stump
    0 tm_stump over 3 years ago in reply to wolfgangfriedrich

    Thanks for the reply.  Just a typo, should have been Mhz.  Easy enough to try a different voltage.

    (added) Just varying the voltage has no effect on the problem.  Out of 5 Digispark clones, 1 appears 'normal' and 4 appear 'not normal'.  My #1 guess is that using the Digispark 16/16.5 Mhz board definitions generates code with a problem for these board or they're just plain defective at the higher speeds.  Is it possible that there is some built-in delay to make the Digisparks work OK but get out of control with the clones?  

    TM

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • wolfgangfriedrich
    0 wolfgangfriedrich over 3 years ago in reply to tm_stump

    Consulting the datasheet, there are 2 versions of the attiny85. The ATtiny85 which is spec'ed up to 20 MHz and the ATtiny85V which is specified only up to 10 MHz. I would be surprised that a clone would use the better and more expensive chip.

    Maybe you can read the marking on the chip and see if it reads "tiny85  20xx" or tiny85V  "10xx". The datasheet is quiet about chip markings but some images of the Digispark show it quite clearly. 

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tm_stump
    0 tm_stump over 3 years ago in reply to wolfgangfriedrich

    Thanks for the reply.
    I've checked the markings and all are -20SU. I'm in the process of running through the programming of each board at different speeds to see exactly what works and what doesn't. I can dump the info on each chip/board to compare the configuration of each to see if I can spot something. So far, the working and non-working board configs look the same, fuses included. I can do a bit more but I'm at the limits of my capabilities, for now. Having read about chip counterfeiting and what happens to chips that don't pass the testing AND for what these Digispark clones cost I think I'll probably write it off as just sub-par ATtiny. I have some ATtiny85 coming from a reputable supplier to see if the same issue exists. The markings on these ICs look too light and suspicious and different from some genuine ATtiny's I have but there's really no way to tell for sure. Anyway, these boards are just some pre-testing to learn the chip for a small project so buying a few more is not a problem.  If I get ambitious enough to build an HVSP I'll try the high voltage reset just for fun.

    On a different note, there seems to be some sort of delay between posting and the post showing up, or not showing up at all, even though it appears to have gone through. ???

    Thanks,
    TM

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube