Notifications
Clear all

Programming the ATmega328  

  RSS

huckOhio
(@huckohio)
Eminent Member
Joined: 11 months ago
Posts: 47
2020-07-07 11:27 pm  

As soon as Bill released the schematic for the Motor Controller board I developed a PCB and sent it off for manufacturer.  I populated the board and then wondered how you would program the ATmega328 chips…better late than never.  I watched Bill’s video titled From Arduino Uno to ATmega328 and saw the three options he presented.  I figured that with a slight modification I could add two connectors for the FTDI board (one for each ATmega328) to the PCB and plug-in the FTDI when I want to program the chip.

My questions are:

  1. Does this approach to program the ATmega328s made sense?
  2. Will I be able to program the ATmega328 while it is connected (via socket) to the Motor Controller card?
  3. Will having the connector and additional capacitor impact the operation of the ATmega328 chips during normal operation?

The pictures below show adding the connector and capacitor to the schematic and where I would likely add the connector to the PCB.

Thanks!

 

Schematic Change
PCB Change

Quote
codecage
(@codecage)
Member Admin
Joined: 1 year ago
Posts: 684
2020-07-08 8:20 pm  

@huckohio

How did I miss the fact that you didn't include a way to plug the FTDI board into the motor control board?   Maybe just be sure to use a socket for the ATmega328 chips and then just program/reprogram on an external device.

I've made a perf board circuit with a ZIF socket for my programming purposes.

SteveG


ReplyQuote
huckOhio
(@huckohio)
Eminent Member
Joined: 11 months ago
Posts: 47
2020-07-08 8:56 pm  

@codecage

Steve, what am I paying you for?!  LOL

I have the chips in sockets (ZIF would have been a great idea), but is it possible to program while they are mounted in the circuit card?  Would there be a conflict between inputs to pins 1,2 & 3 from the PCB circuits (pull ups, etc.) and the data from the FDTI board? 


ReplyQuote
huckOhio
(@huckohio)
Eminent Member
Joined: 11 months ago
Posts: 47
2020-07-08 11:29 pm  

@codecage

Steve, I think I'll go with the external programming option. 

On another subject, do you have any recommendations on a battery for DB1?  Right now I am interested in testing the motors and motion, but son't want a long cable connected to the base.  As always, Thanks!


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 1 year ago
Posts: 684
2020-07-08 11:42 pm  

@huckohio

I'm not in the mode to begin using batteries yet, but have a slew of 12V 7AH batteries and a 12v 35AH battery that probably weighs as much as 5 of the 7AH batteries.

And I plan on programming my ATmega328 chips external to the motor control board.

SteveG


ReplyQuote