Ben Heck's tiny10

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

by Benjamin J Heckendorn

How to use the Atmel ATTINY10 Microcontroller - YouTube (53m)

  • 12V reset for TPI onto his tiny10 protoboard
  • Atmel Studio 7 demonstrations
  • soft UART transmit
  • ADC reads a Hall effect sensor

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Smaller than a grain of rice !? !?  :-(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://youtu.be/ra7bT74EGUs?t=812

and the protoboard that Ben started with :

RadioShack - Grid-Style PC Board 750 Holes

 

Proposed different tacks on Ben's project :

  • tiny10's follow-on is tiny102 (unified memory, self-programming, bootloader, USART or SPI master, 10b ADC, more)
  • MPLAB PICkit 4 has Vpp and the TPI issue was fixed in MPLAB X v5.10
  • tiny102's follow-on is tiny202 (tinyAVR 0-series : UPDI, etc)
  • 1.27mm pitch SMT instead of 2.54mm pitch THT

 


via https://plus.google.com/u/0/106109247591403112418/posts/VTHGwo1TyJZ

ATtiny10 - 8-bit AVR Microcontrollers - Microcontrollers and Processors

RadioShack - Prototyping Boards & Wire

ATtiny102 - 8-bit AVR Microcontrollers - Microcontrollers and Processors

tiny102's on sale at Digi-Key :

https://www.digikey.com/product-detail/en/ATTINY102-SSFR/1611-ATTINY102-SSFRCT-ND/6833015

AN_42676 AT13053: Differences between ATtiny4/5/9/10 and ATtiny102/104 | Application Notes | Microchip Technology Inc.

ATTINY202 - 8-bit AVR Microcontrollers - Microcontrollers and Processors

Surface Mount Prototyping PCBs | BusBoard Prototype Systems

 

edit: SMT

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 3, 2019 - 05:27 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://youtu.be/ra7bT74EGUs?t=648 for about 2m where Ben does a SMT how to.

IIRC, desoldering braid can also damage a PCB due to excessive heat causing lifted pads or traces, soldering mask damage (etc?)

Ben's method of a clean and tinned tip drawing up excessive solder is easier (solder moves towards heat)

A chisel tip can be used to push solder to the pin if there's enough solder (HASL or tinned pad) and flux.

Drag soldering with flux by a hoof tip is fast (a drop of solder on the hoof)

 

1/2 X 25/64 (12.8 X 10mm) 10 Pin SOT/SOP Adapter Breakout B | MPJA.COM

 

edit : MPJA

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Jan 3, 2019 - 05:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Huh.  I watched some of Heck's videos back when Element14 first started up, and wasn't very impressed (seemed to be a lot of mechanical engineering and re-shaping, rather than the EE and CS I was more interested in.)

 

But I thought this one was quite good.  Especially the pacing of the software-writing - not too slow, but not too complex, either.  Showed going back and forth between the datasheet and studio, just like real life...  And he wrote comments!  Useful comments in places where comments were a good idea.  My biggest complaint was the use of binary numbers where perhaps symbolic constants should have been used (not that Atmel's "(1<<WGM00)+(1<<WGM01)" is much clearer than "0b0011"... (sigh.))

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(not that Atmel's "(1<<WGM00)+(1<<WGM01)" is much clearer than "0b0011"... (sigh.))

Perhaps, but (3<<WGM00) immediately tells me mode 3.

 

I usually use something like

const uint8_t wgm = 3;
const uint8_t com = 2;

TCCR0A = (com << COM0A0) | ((wgm & 3) < WGM00);
TCCR0B = ((wgm >> 2) << WGM02) | (1<<CS00);

... for clarity.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My biggest complaint was the use of binary numbers where perhaps symbolic constants should have been used (not that Atmel's "(1<<WGM00)+(1<<WGM01)" is much clearer than "0b0011"... (sigh.))

I dunno,  a simple look at the datasheet would tell you what "(1<<WGM00)+(1<<WGM01)" is all about,  I myself prefer this method. 

 

much clearer than "0b0011"...

No Doubt.

 

 

Joey's method:

const uint8_t wgm = 3;
const uint8_t com = 2;

TCCR0A = (com << COM0A0) | ((wgm & 3) < WGM00);
TCCR0B = ((wgm >> 2) << WGM02) | (1<<CS00);

... for clarity.

 

Kinda makes my head ache, but hey whatever works for you....smiley

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
Kinda makes my head ache, but hey whatever works for you....smiley
I don't >>always<< do that... but often.  All it does is boil down the TCCRnx assignments to a boilerplate that never changes.  Only the modes (timer, compare) change.  Having them lifted out of the assignment makes things a bit clearer I find.

 

I left out the prescaler, but I sometimes lift it out as well:

const uint8_t wgm = 3;  // WGM mode 3.
const uint8_t com = 2;  // Compare mode 2.
const uint8_t pre = 1;  // /1 prescaler.

TCCR0A = (com << COM0A0) | ((wgm & 3) < WGM00);
TCCR0B = ((wgm >> 2) << WGM02) | (pre<<CS00);

Obviously different devices have different timers, and some variation on what bits are where, and how many of them there are, but I still find it helpful.  You could also stuff all of that into an inlined function with no penalty.  YMMV of course.

 

Sorry for the OT.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]