element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Blog Building with an MCU
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 3 Dec 2014 9:32 PM Date Created
  • Views 621 views
  • Likes 0 likes
  • Comments 2 comments
Related
Recommended

Building with an MCU

Former Member
Former Member
3 Dec 2014

Hey there.  I am new to this site and I have recently caught a little bit of the arduino fire.

 

THE PROJECT: (this part is not required for to understand my question.  It is just my first project and I am including this for my very own gratification) I am working on a nightlight for my son's bedroom.  I would eventually love to have it battery operated but that is a ways out.  The idea at this point is to have a pushbutton nightlight that has three levels of brightness, low medium high, which you will push the on button three times to cycle through the levels of brightness, and then hit the button again to turn off.  In between each level I want the LED/S to fade from one level to the next and then fade to off.   I have successfully written the code that will cause an LED to do this when connected to my board.

 

QUESTION ONE:  I would like to build a nightlight that runs on a dedicated MCU, so I can free up the arduino board for other projects.  I also DO NOT want to purchase a smaller arduino board that I can dedicate to this project.  My goal is to gain a greater understanding of MCU's and how to build projects using them.    So the question:  When I have my code compiled and uploaded successfully, it says at the bottom of the Arduino program, "Binary sketch size: 6,250 bytes".  I imagine this number will give me some insight as to which MCU I would need to purchase for my project.  How do I know which MCU will successfully handle my code?  For example, the ATtiny85 data sheet says under features that is has 512 bytes of SRAM.  Is SRAM the number that I am looking for? And does this mean that I would need to find an MCU that can handle the 6.25 kb of SRAM and that the ATtiny85 is not it?

 

QUESTION TWO:  In my limited understanding due to limited research, it appears that I might be able to use one of my arduino boards to program an ATtiny85 or any other small MCU by plugging it into a breadboard and running wires appropriately.  Is this true?

 

Any help or any individual who can be a resource as I stumble my way through this project would be awesome. 

 

mountainfish

  • Sign in to reply
  • Robert Peter Oakes
    Robert Peter Oakes over 11 years ago

    This should help re programming the ATTiny85

     

    http://www.instructables.com/id/Program-an-ATtiny-with-Arduino/

     

    regards

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bobcroft
    bobcroft over 11 years ago

    David,

              This should answer part of your question, taken from the official Arduino web site;

     

    There are three pools of memory in the microcontroller used on avr-based Arduino boards :

    • Flash memory (program space), is where the Arduino sketch is stored.
    • SRAM (static random access memory) is where the sketch creates and manipulates variables when it runs.
    • EEPROM is memory space that programmers can use to store long-term information.

     

    Flash memory and EEPROM memory are non-volatile (the information persists after the power is turned off). SRAM is volatile and will be lost when the power is cycled.

     

    The ATmega328 chip found on the Uno has the following amounts of memory:

     

    Flash 32k bytes (of which .5k is used for the bootloader)

    SRAM 2k bytes

    EEPROM 1k byte

    So if you decide to use another processor then you need to look at its Flash memeory capacity for > 6.25K in your present project.

     

    I believe it is possible to program the ATtiny series via an UNO acting as an ISP (In System Programmer) although I have never done it.  A 'Google' search will usually bring up the information you are seeking.

    An alternative is simply buy a cheap clone UNO and use that but I get the impression you want to build a controller from scratch.  Again there is plenty of information on minimal circuits for the ATmega and Attiny processors.  Usually you just need the chip, crystal oscillator and a few capacitors.  You can also use the internal oscillator on the 328 instead of an external crystal if you want to go really minimal.

    The minimal circuit configurations lack the ability to program the device via USB so you would need to program the devices via a fully configured UNO used as an ISP.  Alternatively you could use a dedicated programmer.

    To my mind these alternatives require a lot more effort than using a cheap clone.

     

    Best of luck.

     

    Bob

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • 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