Reading Notes on ATmega328P MCU using Arduino UNO

Pupils of AUST who are currently undergoing 'Microcontroller Interfacing and System Design using Arduino UNO' course may collect these reading notes from the attached files of this post. The following are the attachments so far made: Edit: Title is changed in respect of the comments of @J-M-L.

Section-1: Fundamentals of Microcontroller
1.1 - 1.13: 1 July 2019

Section-1.pdf (1.86 MB)

Section-2: Architecture of ATmega328P Microcontroller 6 Oct 2019

Section-3: Digital IO Ports 6 July 2019
3.1 - 3.9

Section-4: Analog (ADC Converter) IO Ports 21 July 2019
4.1 - 4.4

Section-5: UART Port driven Asynchronous Serial Communication 5 Aug 2019
5.1 - 5.4

Section-6: I2C Bus driven Serial Communication 8 Aug 2019
6.1 - 6.4

Section-4.pdf (251 KB)

Section-3.pdf (413 KB)

Section-5(UART).pdf (564 KB)

Section-6(I2C).pdf (279 KB)

Section-2(ArchX).pdf (472 KB)

Hi
Thx for sharing your work, must admit I’m quite puzzled...

I went through section1 quickly and the fundamentals are totally weird, eg not sure this is how I would describe what a Microcontroller is.

1.1 What is a Microcontroller?
It is this 28-pin programmable semiconductor chipof type number: ATmega328P.

We can build the following instruments using a Microcontroller:
(1) Taxi Meter,
(2) Prepaid Electrical Energy Meter, and
(3) Digital Weighing Machine, etc.

Basic tasks are not at Microcontroller level but really way above « basic » and when you start describing pins you go straight into

For example: Pin-5 is associated with four signals, and these are PCINT19, OC2B, INT1, and PD3.

...

==> Not sure who is the intended audience? what are pre-requisite to read this?

======
(i also more fundamentally disagree with a number of way you explain stuff - but I suppose that’s a personal value/choice.
Eg: your mixing of signal and pin, the notion or Port without discussing register, or in your table 1.12 the use of “boolean” as a type to describe INPUT, OUTPUT or INPUT_PULLUP or HIGH and LOW.. totally not the case, bool is a formal type of the programming language, the other constants are defined as integral numbers. Octal is not specific to the arduino platform, it’s part of the C/C++ language constant definition, etc...)

I have been trying my best to understand GolamMostafa's writings in this forum for a couple of years. I'm pretty sure his or her heart's in the right place, and I daresay he or she is quite knowledgeable, but almost all of it makes almost no sense to me.

That’s what I think Too - I appreciate the willingness to share his/her work, but I’m at a loss when it comes to some of the assertions made there as being a valuable technical truth or a way to understand what things really are.

No one is perfect and I’m sure I’m making mistakes myself - but when sharing something that is to be seen as teaching documentation, one should try its best to verify or have first a peer review of once work.

I would not recommend any of the above PDF in any class without detailed reading (quality varies)

That being said, if those are personal reading notes (he calls that lecture notes) of his own reading to try to remember things, that’s a different story - but not sure then what is the value for the rest of the forum and in this place.

Anyway - sharing is good. Just always double check the reality and validity of what you read on the internet though.

These documents are being used by at least 150 current pupils who are using UNO as their learning Kits both in theory and lab classes. The reading materials are undergoing regular adjustments based on the feedback of the pupils and the veterans like @J-M-L @meltDown. The Arduino Forum is a good place for the pupils to get their Arduino related reading materials. Converting ignorance into knowledge is the most toughest thing.

meltDown:
I have been trying my best to understand GolamMostafa's writings in this forum for a couple of years. I'm pretty sure his or her heart's in the right place, and I daresay he or she is quite knowledgeable, but almost all of it makes almost no sense to me.

Now, I have two readers, including you, who are spending their valuable times for my better learning which in turn goes among 150 pupils of a culture and environment very much different from that of two highly valued distinctive readers.

J-M-L:
No one is perfect and I’m sure I’m making mistakes myself - but when sharing something that is to be seen as teaching documentation, one should try its best to verify or have first a peer review of once work.

The practical field is different. Having covered Section-1: Fundamentals for 5 weeks (3×5 periods), one has to deliver only 3 lectures on each of ADC, I2C, SPI, TC, PWM, IRQ and ask the recipients to sit for tests based on skills acquired going over the examples of the reading notes.

J-M-L:
That being said, if those are personal reading notes of his own reading to try to remember things, that’s a different story [...]

Very close to reality.

It unfortunately contains errors and approximations
Here is one

bool n = PIND3; //Logic-value of DPin-3 (Pin-5 of MCU) will enter into n

or

while(Serial.available() &&Serial.read()) //either of the method returns 0

J-M-L:
Basic tasks are not at Microcontroller level but really way above « basic » and when you start describing pins you go straight into...

If the word 'basic' really refers to the notion of 'simple+elementary', then the stated four tasks (in my view) are the basic tasks of a MCU.

Here are the 4 elementary tasks

Basic Tasks of a Microcontroller

  1. Takes command (+, _, *, and /) from the user via keyboard/switch (input device);
  2. Takes data from the user via keyboard (input device);
  3. Modifies data in a way the user wants (say, adding two numbers); and,
  4. Delivers the result to the user via 7-segment/LCD display device (output device).

I think the word “basic” is surprising.

Those are not low level instructions, they are already in the real user world (I assume this might apply to your specific kit where you have a keypad and a 7segment?) but if you go there you could give other more general examples as Microcontrolers are way more capable than this (you listed before scale or taxi meter which is the use of sensor to make reading from the real world for example but can also fly drones etc).

J-M-L:
I went through section1 quickly and the fundamentals are totally weird, eg not sure this is how I would describe what a Microcontroller is.

To the kids of a Kindergarten School, the Teacher projects her pointing finger towards a Table and says -- this is a Table; the kids also project their fingers and say -- this is table.jpg a Table. This is how the very beginning of learning starts.

The audience of the Microcontroller class never knew/saw a Microcontroller; hence, they are like the kids of a Kindergarten School. Therefore, the learning/teaching methodology could be the same. So, what is a Microcontroller? This is Atmega328PMCU.png a Microcontroller. The study begins and progresses through interactions.

Atmega328PMCU.png

table.jpg

Well that’s not what you did - right?
You did not describe what a micro-controller is - you described some of things you can do with it

So with your analogy it would be the teacher telling kids a table is a place where you put your plate onto and eat.

And I don’t think you teach in kindergarten either

But hey - I’m just sharing an opinion to possibly help refine your narrative - but if you disagree and if that works for you and your students then go for it. You are the one in front of them.

J-M-L:
Well that’s not what you did - right?
You did not describe what a micro-controller is - you described some of things you can do with it

Having seen a physical MCU chip, the audience immediately wished to know the use of it -- they move by taxi cabs very often and have fresh memory of Taxi Meters which use MCU; they go to shops and very much familiar with Weighing Scales which use MCU; they have Prepaid Electrical Energy Meters in their houses which use MCU.

These gadgets are consumer products and are being sold regularly in large volumes in a country of about 160 millions population. These are very small gadgets in size, and they could be developed using Arduino UNO Kit. These particular examples are purposely placed to motivate the audience (in fact 150 senior level pupils) so that they dream to be Entrepreneurs for which they should be concentrated in MCU Programming/Interfacing. (This is the trick of the Teacher for the pupils to go with Arduino; however, less than 5% pupils like the subject though more than 70% pupils do well in the quizzes and exams!!!)

The 5% would alarm me as a teacher - But As I said - if that works for you and the kids - stay at it.

Section-7: SPI Port driven Serial Communication 9 Aug 2019 Edit:14/9/19
7.1 - 7.3

Section-8: TC1 (Timer/Counter 1) Module in Normal Mode Operation 21 Aug 2019
8.1 - 8.5

Section-9: TC (Timer/Counter ) Based PWM Signals 28 Sep 2019

Section-10: Interrupt Structure 28 Sep 2019

Section-11: Peripheral Controllers (... on process)

Section-12: Peripheral Devices (DS3231 RTC) 3 Oct 2019

Section-13: Sensors (..on process)

Section-8(TC1-Module).pdf (218 KB)

Section-10(INTR).pdf (179 KB)

Section-9(PWM).pdf (442 KB)

Section-12(PeriphralDevices)4Page.pdf (270 KB)

Section-7(SPI)A (10).pdf (422 KB)

Section-14B: Arduino UNO Based Taxi Meter 9 Oct 2019

Section-15: Library Functions (... on process)

Section-Ch14B(Taxi Meter).pdf (660 KB)