Author Topic: Help with a ICSP programmer project  (Read 867 times)

0 Members and 1 Guest are viewing this topic.

Offline AlaezaeTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Help with a ICSP programmer project
« on: July 25, 2020, 06:40:57 pm »
Hello,

I am trying to design my own ICSP programmer for use with AVR microcontrollers. I am very new to this but figured it would be challenging enough to keep me occupied for a while. Let me preface what I'd like to do:

My plan (after researching a few programmers which are out there) is to use a USB to SPI converter chip (datasheet below) and then send that out to the ISCP pins, the problem is that there is extra information in each field. I wanted to know if all that extra stuff (packet identifier, address, etc.) will be a problem since I only want to send the data from the .hex file to the microcontroller. I'm using an FT221 chip, FTDI's USB-SPI converter, all their documentation seems to point to me not using this since they say "No detailed knowledge of USB protocol needed to use our chips."

The way the off-the-shelf programmers do it is with a separate microcontroller which converts to SPI from a USB interface on the board. None of them do it the way I was planning to, which is why I was curious if I was completely wrong. I thought that it might have been the cost of the FTDI chip, at $1.50/chip in bulk, it might get kind of expensive when mass producing. I don't know, I figure it's more likely that they don't do it because I'm wrong.

Anyways, any help I could get would be very much appreciated. You all are smart people, I don't think this project is that complicated.... I'm still new to this so if I said something dumb please forgive me. Thanks!

Cam

FT221X Datasheet - https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT221X.pdf
ICSP Pocket Programmer - https://www.sparkfun.com/datasheets/Programmers/AVR-Pocket-Programmer-v15.pdf
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1472
  • Country: us
  • Very dangerous - may attack at any time
Re: Help with a ICSP programmer project
« Reply #1 on: July 25, 2020, 08:01:33 pm »
FT221X won't work because it is a SPI slave. You need a SPI master to program an AVR.

The CH341 does SPI master and can be used for programming AVR.
https://ericdraken.com/avr-amtel-attiny-ch341a-isp-programmer/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf