B
B
blackgrom2021-09-12 18:20:49
Arduino
blackgrom, 2021-09-12 18:20:49

Atmega2560 needs to be connected to a crystal oscillator or resonator?

hello. I have done several projects on arduino and now I would like to try to make a project without an arduino board but on my board. I think to solder the atmega2560 from the arduino and solder it to my own, and now, as far as I understand, it is desirable to connect it with quartz at 16 MHz. I was looking for information on Google and suddenly found out that quartz can be both an oscillator and a resonator, and I was at a dead end. now I'm looking for an answer to the question (do I need to program the atmega2560 with a crystal oscillator or a resonator)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kalapanga, 2021-09-12
@kalapanga

If you think that you are ready for something “more serious”, then you need to act “in a serious way”. Take the datasheet to your microcontroller and find in it all the wiring you need to start.

A
Andrey Ezhgurov, 2014-09-04
Pyan @marrk2

With regard to the table structure proposed by sayber: add an int type count field with a default value of 0 to questions, and hang triggers on the answers table (should be InnoDB):

DELIMITER $$

CREATE DEFINER = 'root'@'%' TRIGGER answers_after_insert
AFTER INSERT ON answers FOR EACH ROW
BEGIN
  UPDATE questions
  SET questions.count = questions.count + 1
  WHERE questions.question_id = NEW.question_id;
END

$$

CREATE DEFINER = 'root'@'%' TRIGGER answers_after_delete
AFTER DELETE ON answers FOR EACH ROW
BEGIN
  UPDATE questions
  SET questions.count = questions.count - 1
  WHERE questions.question_id = old.question_id;
END

$$

DELIMITER;

In this case, the questions.count field will automatically contain the exact number of answers to the question, and filtering/sorting by the number of answers becomes trivial.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question