CS to reset or to SS?

Hi everyone!
first of all I hope everyone is good for the covid. And the pandemic has improve your time in to your proyects.

For me was like this and I start to do my first pcbs with schematics. this week I made a try with an Atmega328P-PU, I took it like a challenge to improve but also cuz it is the more easy way to achieve what I like to do.

for this project a have 2 main issues, first, with some schematics that I see online, they connect the port CS of the communication to the reset pin but some intuitions says me that it should be connected to PB2(pin 14) (SS). Am I right? Or it doesn't matter?(see the attachment 1 with the schematic)

and second. I want to use for this project the internal 8Mhz clock of the atmega, but in my google research i see that the people that use this method, program the atmega328 with an FTDI programmer connected to the UART pins (witch ive never used before). Is there a way to do the same but with other arduino instead of buying the FTDI programmer?

any help is welcome and i'll be very grateful with any advice to improve mi schematic or pcb. :slight_smile:
Thanks !

PCB_pcb2_2021-02-02 (2).png

PCB_pcb2_2021-02-02 (3).png

PCB_pcb2_2021-02-02 (2).png

PCB_pcb2_2021-02-02 (3).png

  1. DTR from FTDI goes thru 0.1uF cap to Reset pin. Going to SS will just screw up the SS signal.

  2. Any device that can talk over the SPI pins (Reset and SCK, MISO, MOSI) can be used to install set the fuses, install a bootloader (or not), and install sketch.
    2a. Once a bootloader is installed and the fuses are set, then any device that can produce a Low on the DTR input and talk over Rx/Tx can be used for serial downloads.

  3. Your schematic is missing 0.1uF caps on Each VCC and AVCC pin. You should also add a 0.1uF from AREF to Gnd; do not connect AREF to VCC, that is done by an internal mux.

  4. I would add pads for a crystal and 22pF caps (or a resonator, but a crystal is more accurate), you don't have to populate them. You can also use a 16 MHz crystal and slowdown the system clock via register settings, or perhaps fuses.

  5. I would also break out any other unused pads, you never know when they may come in handy. SCL & SDA especially, bring them to a connector with power & Gnd.

  6. I would change the buttons to have the button contacts connect the pins to Gnd instead of VCC. Then just use the internal pullup resistor, and have the code react to a LOW input instead of a high. You can wire the external resistors as pullups, and just not populate them if the internal pullups are sufficient

pinMode (pinX, INPUT_PULLUP);  
if (digitalRead (pinX) == LOW){
//pin is pressed, do something
  1. A6 & A7 are analog input only.

  2. Try the LEDs with the selected resistor, make sure they're not too bright.

any help is welcome

Hi, I can do my part, some are the same that CrossRoads already wrote (I will go through my text and mark them).

EasyEDA makes a nice schematic. Have you tried KiCad ?

a. The CR2032 is not good enough. You need 3 AA batteries.
b. The 330 Ω is a lot of current for a battery powered project. Try extra-bright leds with 1 kΩ. (almost the same as CrossRoads number 8 ).
c. There is no diode from /RESET to VCC. The DTR signal might turn the /RESET into HV programming mode. See the schematic of the Arduino Uno.
d. Do not connect VCC to the AREF pin ! (same as CrossRoads number 3).
e. Your RX pin is open and will receive noise. You could add 10k to VCC. The RX signal is idle high.
f. Where are your decoupling capacitors ? (same as CrossRoads number 3).
g. Without external crystal or resonator, a baudrate for serial communication might be too inaccurate (almost the same as CrossRoads number 4).
h. You have your buttons to VCC and leds to the ATmega pins. It is common to put the active component with one leg to GND (almost the same as CrossRoads number 6).
i. The /RESET and the ChipsSelect of a SPI bus are two totally different things. The 'SS' or 'CS' are two names for the same thing (same as CrossRoads number 1).
j. When you put an empty sketch (empty setup() function and empty loop() function) in a Arduino Uno, then you can use the USB-serial part of the board. That is the same as using a FTDI module.
k. The text of your post has the color tag #64676e, can you use normal text ?

CS does NOT go to !RESET - How would you digital Write to it?

Think how much about the circuit you would find out if you breadboarded it first.

What is the purpose or to what use are you intending for the 'Communication SPI' pins ?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.