21:26 "crudest round-robin scheduler" Ha, but one I can easily understand. In the PIC32 version of this course this simple scheduler seems to be dropped in favor of a more complicated RTOS. For now I feel perfectly happy within the main loop. How could you describe this task scheduler? Something like: a single loop program with non-preemptive tasks in combination with an interrupt system? I miss the timer in this definition.
It is called a forground/background scheduler. The timer ISR is refered to as the foreground, the main loop is the background process. The PIC32 version in NOT an RTOS! It is a non-preemptive scheduler written all in GCC by Adam Dunkels. It was trivial to port to the PIC32 and is quite easy to use. people.ece.cornell.edu/land/courses/ece4760/PIC32/index_Protothreads.html I used it because it is very lightweight and has reasonable syntax. I also ported a full preemptive scheduler for the AVR years ago. people.ece.cornell.edu/land/courses/ece4760/TinyRealTime/index.html
@@ece4760 Thanks. You kept me awake until 2:00 in the morning reading into multitasking with microcontrollers. I've found the guy who can pull a gun in a microsecond: ua-cam.com/video/jiGjp7JHiYs/v-deo.html His book pops up at wikipage about Run to Completion scheduling. I attended a public lecture a few years ago where Tanenbaum introduced Minix 3. I remember him pulling the gun, not the algorithm. Also I remember the spaghetti in the beards of philosophers, not the solution to prevent them from starvation. These metaphors are pointers to a solution, but unfortunately not the solution itself. I need motoric, sensory memory to understand this stuff. Your classes provide that. I wonder if Tannenbaum and Dijkstra loved the smell of solder flux in the morning. Actually, I think Dijkstra did, building his first computers from woII army surplus. And Andy prying into voting machines Grts
Page 328 of the mega1284 datasheet, section 28.1, DC characteristics. If you look at VOL Output Low Voltage VOH Output High Voltage the voltage drops associated with the stated current allows you to calculate the thevinin resistance.
Thanks Prof.Land. I have one question please. So we have the thevenin for Vhigh Veq=4,2V and Req=40 Ohm. Inserting a LED and considering Vishay data sheet of VfRedLed of approx 2V lead us to a 55mA current draw from the port. That's way below the 100mA max of the LED max current and also Ioh of the MCU. Do we still need a limiting resistor? Thank you for your precious gift and effort. Regards from Italy
Prof.Land Sorry bothering you again. For the Thevenin Equivalent Resistance at Output High I understand that Req= 40 Ohm since (Vcc-4,2)/20 mA . But does it make sense to calculate it also for Output Low case? Veq=0,9 V Req=45 Ohm? In what case of calculation may I use the Output Low Thevenin Equivalence? Maybe for the current to drive BJT for an inverted logic (such the case of the STK-500 LED driver?) Am a bit confused...Thank You so much.
There is no logical difference between a voltage source at Vcc or one at zero volts. If you have a load which pulls the pin high (like an LED attached to Vcc) then the low-state impedance measures the actual output voltage.
Excuse me Prof.Land. I have one question please. So we have the thevenin for Vhigh Veq=4,2V and Req=40 Ohm. Inserting a LED and considering Vishay data sheet of VfRedLed of approx 2V lead us to a 55mA current draw from the port. That's way below the 100mA max of the LED max current and also Ioh of the MCU. Do we still theoretically need an extra limiting resistor? Thank you for your precious gift and effort. Regards from Italy
chris lunsford GCC, like most compilers targeted to microcontrollers, has language extensions that allow you to declare to the C compiler that a function needs to save the entire CPU context in its prologue, and restore the entire CPU context in its epilogue, allowing it to be used as an ISR.
No one wants to teach AVR except Bruce Land, Limor "Lady Ada" Fried, or Gerhard Schmidt and a few others on the web... great basic lecture, just wondering why everyone wants to use C code and not plain old assembly! or, still having the ability to communicate with PC terminal with plain assembly, without writing any C code... thanks very much Mr. Land!
chris lunsford Most code isn't time critical, so it is wasteful to write the whole thing in assembly. The AVR has a very simple pipeline with no fancy scheduling or out of order execution, therefore, "hand coded" assembly is not likely to make anywhere near the improvement you might expect from the additional effort.
I tried to access the Thevenin circuit of the AVR with no luck. Can you explain this or suggest me info on the subject? I know what a Thevenin circuit is, I just don't know where to find it in the datasheet. Thanks.
Amazing! Bruce Land is top lecturer. Inspiring videos and so much skills in one man. Thank you for sharing your knowledge.
21:26 "crudest round-robin scheduler" Ha, but one I can easily understand. In the PIC32 version of this course this simple scheduler seems to be dropped in favor of a more complicated RTOS. For now I feel perfectly happy within the main loop. How could you describe this task scheduler? Something like: a single loop program with non-preemptive tasks in combination with an interrupt system? I miss the timer in this definition.
It is called a forground/background scheduler. The timer ISR is refered to as the foreground, the main loop is the background process. The PIC32 version in NOT an RTOS! It is a non-preemptive scheduler written all in GCC by Adam Dunkels. It was trivial to port to the PIC32 and is quite easy to use.
people.ece.cornell.edu/land/courses/ece4760/PIC32/index_Protothreads.html
I used it because it is very lightweight and has reasonable syntax. I also ported a full preemptive scheduler for the AVR years ago. people.ece.cornell.edu/land/courses/ece4760/TinyRealTime/index.html
@@ece4760 Thanks. You kept me awake until 2:00 in the morning reading into multitasking with microcontrollers. I've found the guy who can pull a gun in a microsecond: ua-cam.com/video/jiGjp7JHiYs/v-deo.html His book pops up at wikipage about Run to Completion scheduling. I attended a public lecture a few years ago where Tanenbaum introduced Minix 3. I remember him pulling the gun, not the algorithm. Also I remember the spaghetti in the beards of philosophers, not the solution to prevent them from starvation. These metaphors are pointers to a solution, but unfortunately not the solution itself. I need motoric, sensory memory to understand this stuff. Your classes provide that. I wonder if Tannenbaum and Dijkstra loved the smell of solder flux in the morning. Actually, I think Dijkstra did, building his first computers from woII army surplus. And Andy prying into voting machines Grts
That's when you know it's interesting... nobody is keeping time.
Good lectures so far (1 and 2).
These lectures are priceless. Thanks a bunch for this masterpiece❤
Page 328 of the mega1284 datasheet, section 28.1, DC characteristics. If you look at
VOL Output Low Voltage
VOH Output High Voltage
the voltage drops associated with the stated current allows you to calculate the thevinin resistance.
Thanks Prof.Land. I have one question please. So we have the thevenin for Vhigh Veq=4,2V and Req=40 Ohm. Inserting a LED and considering Vishay data sheet of VfRedLed of approx 2V lead us to a 55mA current draw from the port. That's way below the 100mA max of the LED max current and also Ioh of the MCU. Do we still need a limiting resistor? Thank you for your precious gift and effort. Regards from Italy
Prof.Land Sorry bothering you again. For the Thevenin Equivalent Resistance at Output High I understand that Req= 40 Ohm since (Vcc-4,2)/20 mA . But does it make sense to calculate it also for Output Low case? Veq=0,9 V Req=45 Ohm? In what case of calculation may I use the Output Low Thevenin Equivalence? Maybe for the current to drive BJT for an inverted logic (such the case of the STK-500 LED driver?) Am a bit confused...Thank You so much.
There is no logical difference between a voltage source at Vcc or one at zero volts. If you have a load which pulls the pin high (like an LED attached to Vcc) then the low-state impedance measures the actual output voltage.
Excuse me Prof.Land. I have one question please. So we have the thevenin for Vhigh Veq=4,2V and Req=40 Ohm. Inserting a LED and considering Vishay data sheet of VfRedLed of approx 2V lead us to a 55mA current draw from the port. That's way below the 100mA max of the LED max current and also Ioh of the MCU. Do we still theoretically need an extra limiting resistor? Thank you for your precious gift and effort. Regards from Italy
you do need it becuase the max current from an AVR port pin is around 30 mA.
Are there some background or pre requisite subjects that we must to know before watch your classes?
Thanks for the videos!
Some familiarity with C programming and read the microcontroller documentation.
I always thought you had to write the interrupt anyway and just 'reti' if you are not using the interrupt, but, I guess it is different for C code.
chris lunsford GCC, like most compilers targeted to microcontrollers, has language extensions that allow you to declare to the C compiler that a function needs to save the entire CPU context in its prologue, and restore the entire CPU context in its epilogue, allowing it to be used as an ISR.
No one wants to teach AVR except Bruce Land, Limor "Lady Ada" Fried, or Gerhard Schmidt and a few others on the web... great basic lecture, just wondering why everyone wants to use C code and not plain old assembly! or, still having the ability to communicate with PC terminal with plain assembly, without writing any C code... thanks very much Mr. Land!
chris lunsford Most code isn't time critical, so it is wasteful to write the whole thing in assembly. The AVR has a very simple pipeline with no fancy scheduling or out of order execution, therefore, "hand coded" assembly is not likely to make anywhere near the improvement you might expect from the additional effort.
Hi i am a mechanical engineer and i want to study these course so
what i have to know of courses before i start these course
thanks :)
Holly shit 30:50 that asking question guy is Jeremy Blumm i think :))
I tried to access the Thevenin circuit of the AVR with no luck. Can you explain this or suggest me info on the subject?
I know what a Thevenin circuit is, I just don't know where to find it in the datasheet.
Thanks.
Indeed it is.
Jerremy Blum @30:00
Thanks, will look into it. That was a fast response. Thanks.
Yes, he is.
Is this a graduate class?
+Ritz “ssj4rit” Tan This is a junior/senior class (third or fourth year) with some masters students (5th year).
He must be a smoker.