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 1842 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
  • tm_stump
    0 tm_stump over 3 years ago

    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:0x62 vs Lfuse:0xE2 (disabled).  The subsequent boards compiled at 16 Mhz had the Lfuse CKDIV8 enabled and so taking that board and just changing the Lfuse to disable CKDIV8, using avrdude -U lfuse:w:0xe2:m (+ the config params), the board works as expected.  This works in every case.  Now the question becomes 'why are the fuses compatible with the board choice not written in addition to the program?'  The only thing I can come up with is that I'm overlooking some setting that allows the entire sketch, including compatible fuse settings, to be written or changed.  Or maybe I found a bug when using clones with the digistump libs, but there's no feedback in searches for this type of problem so I doubt the bug factor is valid.  Back to the datasheet for a deeper dive!

    The resultant output of the incorrectly operating boards varied from very, very slow operation to giving a very slow display and an inverted display on the .96" OLED used to show the button count.  Very odd.

    thanks,

    TM

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

    I think the fuses get set when you choose a different menu option, something like "Burn bootloader".

    Not done every time you upload as that takes too long.

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

    I think the fuses get set when you choose a different menu option, something like "Burn bootloader".

    Not done every time you upload as that takes too long.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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