1

I am thinking about buying an ATtiny84A, which fits perfectly into my project. I want to embed it into a watch that I am designing right now. But I want to buy an SMT version so I have less space to consume. What do I need for programming it through USB? Special Atmel chip? Or just 2 digital pins from USB directly into it? Thank you very much. :)

  • 1
    A USB programmer. – Ignacio Vazquez-Abrams Oct 14 '17 at 9:49
  • That is too bulky to fit into my project. And I can't find any chip that programmer which would tell me what I need. – Jakub Janek Oct 14 '17 at 9:50
  • 3
    You don't fit it into your project. There should be no reason to program it in the field. – Ignacio Vazquez-Abrams Oct 14 '17 at 9:50
  • What about software updates. Like bug fixes and stuff. – Jakub Janek Oct 14 '17 at 9:59
  • 3
    gotta find this online is the right starting point before visiting this site. – user31481 Oct 14 '17 at 10:16
1

You need to design your device to permit In Circuit Serial Programming - ISP. This will let you continue to refine the program once the chip is in the circuit, and it will also be your primary method of programming and testing small production quantities.

Basically this means that the ISP and reset pins of your processor need to be able to be externally contacted - either by a header, pads for "pogo pin" spring contacts, an SOIC test clip, or perhaps micrograbbers hooked onto individual pins.

It also means that anything connected to those pins needs to not interfere with or be harmed by the programming process. That particularly means that anything which could drive any of these pin needs to not do so while the MCU is being programmed, nor load them, nor get lastingly confused by operations the programmer does on them.

You'll also need an ISP programmer. Proper ones are sold, but beware of cheap clones and marginal designs as these often give users plenty of trouble. Fortunately, you can use an everyday Arduino running the ISP sketch to program ATtiny chips. Do beware though, that if your target is powered at 3.3v it is not safe to use a programmer with 5v signals on it - you might get away with it a few times, but eventually it will cause issues. So if you want to use an Arduino to ISP a lower voltage target, you either need an Arduino that runs at 3.3v, or to implement level shifting.

Do spend some effort to verify that you have the software support resources you may need for the ATtiny84A - it's one of the less common chips so it won't have the same degree of community support.

A further possibility is to use ISP to put a serial (or other) bootloader into the chip and then rely on that, however this won't cover all eventualities - if you discover you need to change the fuses, you'll need ISP for that, as it's something a bootloader can't do.

  • Not aceptable. It require making a hole in the watch, which render it not waterproof. And mounting a connector in a existent case is not an easy task. He can make a conventional prototype on a small perforboard with a wrist band for field testing and have access to all internal signal also. It will look nerd, but ... – user31481 Oct 15 '17 at 6:56
  • On the contrary, nothing short of reprogrammability is remotely acceptable - no actual product has just one prototype, there's a whole pilot run that needs to be iteratively fixed. It's almost certain this improvised "watch" won't have a waterproof case, but even if it does, the connections can be inside. In the real world, people engineer systems to be able to finish them. Or to exercise the trite meme, the 1990's called and they want their OTP MCU's back. Why would you return there by choice? Today, even throwaway products often have ISP/SWD pads - because their designers aren't idiots. – Chris Stratton Oct 15 '17 at 7:13
  • For god's Sake! He is a high school student! He need a cheap, easy, affordable solution. Even a US$70 solution is too expensive for him. He probably only have access to a solder iron and a multimeter. You are giving the right answer to the wrong person. Focus on people and his needs. – user31481 Oct 15 '17 at 7:34
  • You seem to have neither any idea of what you are talking about, nor any reading comprehension - as already explained above ISP requires only a cheap Arduino clone for support. Building something around an ATtiny84A will be challenging enough (as cautioned above); but intentionally making it even harder by trying to do it without recourse to ISP to iteratively fix mistakes would be the height of masochistic stupidity. – Chris Stratton Oct 15 '17 at 7:35
  • Thank you guys for your discussion :) You helped me a lot. I am an open source developer the code is not a problem. But hardware is a little one. I will find suitable solution with custom firmware for reading sd card for program or another flash built into chip which can be reprogrammed through AVR. There is a lot of solutions but thanks :) – Jakub Janek Oct 15 '17 at 8:31
0

You need an Surface Mount Adapter Kits

enter image description here

This is a soldered version for breadboard prototyping.

There is a model that doesn't requires soldering:

enter image description here

This cost US$70 (http://www.logicalsys.com/painfo-vpasp-vb.asp?adapter=pa8tss-ot)

After that, you mount your SMD on a breadboard and program the ATtiny as normal.

Of course, it doesn't work if your ATtiny is already soldered in the watch.

  • Wau. That is expansive. Thank you for the answer :). I was hoping that someone would tell me how to make it programmable if it is in the project via USB. But still thanks :) – Jakub Janek Oct 14 '17 at 11:42
  • No. This is unlikely to really help with the problem of the question. For prototyping one might as well use a DIP if available. And out-of-circuit programming in that socket won't be viable during software development, as it would mean continuously desoldering chips. Nor will it be viable for production beyond a handful. Essentially, the poster needs to set up in circuit serial programming. – Chris Stratton Oct 14 '17 at 16:42
  • @ChrisStratton. The right way to do it is develop in breadboard, not in the watch itself. Or have a prototype watch with connectors. With that options you can develop and test prototypes in real world. Ugly? Yes, but works. This is an X-Y problem. – user31481 Oct 14 '17 at 18:53
  • @LookAlterno - you can do preliminary work on a breadboard, but not being able to readily change the firmware while refining the actual fits-on-wrist build is utterly unacceptable - and that's what staying within the bounds of your suggestion would lead to. This isn't in any way an XY problem - a very appropriate question was asked, which you failed to address at all - we might fairly call this an "XY answer". – Chris Stratton Oct 14 '17 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.