Go Down

### Topic: Self-test on Simple Programming of ATmega328 using Arduino UNO Platform (Read 5415 times)previous topic - next topic

#### Robin2

#15
##### May 25, 2017, 08:38 pmLast Edit: May 26, 2017, 09:22 am by Robin2
This is the second time you have tried to hi-jack another person's Thread with your question which has absolutely ZERO to do with the Thread.

Don't do that.

Post I was referring to seem to have been removed

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

#### GolamMostafa

#16
##### May 26, 2017, 06:53 amLast Edit: May 26, 2017, 10:18 am by GolamMostafa

Subj : Quiz-question/Answer Review subject to mutual correction:

1. -

2. -

3. I expected:     DDRD0 = HIGH; (coneptually; it will not be compiled by IDE).

4. Why should I assume that Pin-4 is a physical pin of the MCU? How is it ambiguous? Is there any other
possible meaning (reference) other than the metallic pin of the MCU?

5. I expected:

byte y = 0x4F;     //(0100 1111 = p g f e d c b a = 3 =  0100 1111; 00 1111 ----> PB5 - PB0)
PORTB = y;

bitWrite (PORTD, 6, bitRead(y, 6));       // y = y67 y6 y5 y4 y3 y2 y1 y0
or

bitSet(0, LOW);
bitSet(1, HIGH);

6. -

7.  (After the inclusion of the 74LS138 decoder, how many port lines are now available in the system?)
Let us correct the Question:
After the inclusion of the 74LS138 decoder, how many port lines are now available in the
system?
have increaded in the ATmega328 system?

I expected: 2   (we have 20 port lines in the MCU; now 74LS138 has gievn two more extra!)

8.  I expected the students to analyse every line and then come to the result; they didn't except 5.
byte x = 0x87;                   // x = 1000 0111
boolean n = bitRead(x, 7);   // n = 1
bitWrite(PORTD, 7, n);        // PD7 = LH    // p (point)
digitalWrite(1, HIGH);         // PD1 = LH   // DP2
bitSet(PORTD, 0);              // PD2 = LH

[first 3 lines put HIGH on pin13, so p is driven.
PORTD bits 1,0 = 1,0 -> DP2 enabled]

[The Proverb: British/French says:  Get the knowledge first and then analyse.
American says: Analyse and then find the answer.
American says: It will be in the market next month. Japanese says: It (the same
thing) is already in the market.]

9. -
I have a question.
If I want to measure the internal TS's (Temperature Sensor) signal, which channel should I use
apart from using Vref = 1.1V (INTERNAL)? Data sheet says: Ch-8. The syntax: analogRead(A8) is
not accepted. I used analoagRead(8); the value is 60.00 deg C.  It does not
change! I have solved the following equation based on the TS' response points: A(25 degC, 0.314V),
B(85 degC, 0.380V).

Code: [Select]
`     DECT (Decimal Temperature) = 9090909* Vdt - 2604545  (10+4 Times amplified)     BINT (Binary temperature, 10+6 Times amplified) = 0x0EEA6D* Vht - 0x0F863864     ( Vdt (Output DC Voltage of TS at T degC) = (Vht*1.1)/1023); Vht = ADC value at T degC.     `

10. The question is to be corrected as follows:
What output values (0 or 1) would be produced by the Question-(c) of the following
instructions after pressing K1?
(The students are not yet familiar with the internal structure of PORTD Latch.) I would

#### GolamMostafa

#17
##### May 26, 2017, 07:28 amLast Edit: May 26, 2017, 07:49 am by GolamMostafa
Quote
Don't do that.
I think that the Moderators are here to offer guide lines as they think suitable (correction, motivation, punishment, insult, threat, ..., sometimes smile!). Others might suggest Moderators to take actions; but, certainly not the reporter himself as it violates the right of defence of the to be accused!

#### GolamMostafa

#18
##### May 26, 2017, 09:08 amLast Edit: May 26, 2017, 03:27 pm by GolamMostafa
Those including me, who are engaged in the Learning/Teaching Process of ATmega328 MCU using Arduino UNO Platform may down load the attached Experiment-2 File for practising.

#### Robin2

#19
##### May 26, 2017, 09:24 am
I think that the Moderators ...
The Post I was referring to seems to have been removed.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

#### GolamMostafa

#20
##### May 26, 2017, 10:09 am
Thanks and many thanks for the clarification. Let there be opportunities for us to serve ourselves and others who need a little bit help to make a move.

"We have a member in the Forum who frequently utters: The hammer sees everything as nails; but, this is practically, sometimes, false. There are 134 students in a class (nails); there is only one teacher (hammer); how does the teacher detect the 5 -- differently able?"

I have read your scholarly writing made in response to someone's thread on 'Polling opinions on learning..'  I have forgotten the location. I wish to read it again; can you please refer me to the link if you can remember?

#### Robin2

#21
##### May 26, 2017, 10:49 am
I have read your scholarly writing made in response to someone's thread on 'Polling opinions on learning..'  I have forgotten the location. I wish to read it again; can you please refer me to the link if you can remember?
If that is addressed to me then I'm sorry, I can't remember. But it was probably addressed to someone else because I can't ever recall writing anything "scholarly"

Have you tried to see if Google can find it?
Do you know what section of the Forum it was in?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

#### AWOL

#22
##### May 27, 2017, 09:13 pm
"We have a member in the Forum who frequently utters: The hammer sees everything as nails; but, this is practically, sometimes, false. There are 134 students in a class (nails); there is only one teacher (hammer); how does the teacher detect the 5 -- differently able?"
I think the usual quote is "If the only tool you have is a hammer, the tendency is to see all problems as nails".

Whatever.

If the teacher sees himself/herself as a hammer, what hope is there for any of the students?

#### GolamMostafa

#23
##### May 27, 2017, 11:45 pm
This is the beauty of any living language, particularly, the English that it can paraphrase a given sentence (s) to bring out an impressive meaning.

Go Up