Recent

Author Topic: Blinky on attiny 10  (Read 4555 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Blinky on attiny 10
« Reply #15 on: October 19, 2020, 07:14:44 pm »
Question from a dummy in electronics: how do you "flash" this kind of chip (i.e. inject inside, the compiled FPC code)? Is an Arduino required with its "EDI", before this kind of electronic "test" board?

I can't speak for that specific chip, but by and large you need something like Avrdude plus a little interface box that costs about a fiver (some of which need a firmware update before they're useful, links if you're interested).

If the chip has been set up ("fuse bits" which are actually rewritable) to ignore that protocol, there's another that uses a special AVR debug mode.

And if that's disabled there's JTAG.

If you've got the Arduino IDE then by default it assumes that there's a loader at the top of Flash which talks 5V serial to a PC. That doesn't stop you from taking the generated .hex file and getting it into Flash some other way.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Mathias

  • Jr. Member
  • **
  • Posts: 88
Re: Blinky on attiny 10
« Reply #16 on: October 19, 2020, 08:41:29 pm »
Impressive and interesting.

Question from a dummy in electronics: how do you "flash" this kind of chip (i.e. inject inside, the compiled FPC code)? Is an Arduino required with its "EDI", before this kind of electronic "test" board?
http://www.technoblogy.com/show?1YQY

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: Blinky on attiny 10
« Reply #17 on: October 19, 2020, 08:47:25 pm »
Question from a dummy in electronics: how do you "flash" this kind of chip (i.e. inject inside, the compiled FPC code)? Is an Arduino required with its "EDI", before this kind of electronic "test" board?

I can't speak for that specific chip, but by and large you need something like Avrdude plus a little interface box that costs about a fiver (some of which need a firmware update before they're useful, links if you're interested).
Indeed, I used avrdude and a cheap USBasp programmer:
Code: Text  [Select][+][-]
  1. avrdude -p t10 -c usbasp -q -U flash:w:blink.hex:i
  2.  
  3. avrdude: AVR device initialized and ready to accept instructions
  4. avrdude: Device signature = 0x1e9003 (probably t10)
  5. avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
  6.          To disable this feature, specify the -D option.
  7. avrdude: erasing chip
  8. avrdude: reading input file "blink.hex"
  9. avrdude: writing flash (102 bytes):
  10. avrdude: 102 bytes of flash written
  11. avrdude: verifying flash memory against blink.hex:
  12. avrdude: load data flash data from input file blink.hex:
  13. avrdude: input file blink.hex contains 102 bytes
  14. avrdude: reading on-chip flash data:
  15. avrdude: verifying ...
  16. avrdude: 102 bytes of flash verified
  17.  
  18. avrdude done.  Thank you.

Also if you want more of the Arduino IDE experience then you can try the Lazarus-Embedded package which gives a GUI to handle some of the common functionality such as configuring fuses and avrdude (I haven't yet tested this package).

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Blinky on attiny 10
« Reply #18 on: October 19, 2020, 09:24:18 pm »
Indeed, I used avrdude and a cheap USBasp programmer:

I've got one labelled AVRISP which has to be reflashed using an Arduino: the firmware in it isn't quite as expected.

I've had a lot of "fun" over the last few months with a 649 board upcycled from a washing machine. it uses the "Butterflycore" loader but I found I had to change that since it was making some bad startup decisions (if there was application code in Flash it wouldn't first check if the user wanted to use the loader to reflash it. Also it has something odd in its reset circuitry which meant that it wanted the wrong sense of DTR and I had to modify Avrdude... learnt a lot, the modified stuff is at https://github.com/MarkMLl Next job is to see if I can get the LCD working, ultimately I hope to have it controlling a produce drier but I've clearly missed that one for this year :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: Blinky on attiny 10
« Reply #19 on: October 20, 2020, 08:38:44 pm »
Thank you all for your insights.
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

 

TinyPortal © 2005-2018