#2 - MCU and lab 1

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 28

  • @pasihein
    @pasihein 12 років тому +1

    Amazing! Bruce Land is top lecturer. Inspiring videos and so much skills in one man. Thank you for sharing your knowledge.

  • @oberoiddroidus2114
    @oberoiddroidus2114 4 роки тому

    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.

    • @ece4760
      @ece4760  4 роки тому

      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

    • @oberoiddroidus2114
      @oberoiddroidus2114 4 роки тому

      @@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

  • @mcr1981
    @mcr1981 12 років тому +1

    That's when you know it's interesting... nobody is keeping time.
    Good lectures so far (1 and 2).

  • @impulsembedded7147
    @impulsembedded7147 2 роки тому +1

    These lectures are priceless. Thanks a bunch for this masterpiece❤

  • @ece4760
    @ece4760  11 років тому

    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.

    • @Steve_LSP
      @Steve_LSP 5 років тому

      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

  • @Steve_LSP
    @Steve_LSP 5 років тому

    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.

    • @ece4760
      @ece4760  5 років тому

      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.

  • @Steve_LSP
    @Steve_LSP 5 років тому

    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

    • @ece4760
      @ece4760  5 років тому +1

      you do need it becuase the max current from an AVR port pin is around 30 mA.

  • @elnapa091
    @elnapa091 8 років тому +3

    Are there some background or pre requisite subjects that we must to know before watch your classes?
    Thanks for the videos!

    • @ece4760
      @ece4760  8 років тому +3

      Some familiarity with C programming and read the microcontroller documentation.

  • @xeno8555
    @xeno8555 10 років тому +1

    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.

    • @douggale5962
      @douggale5962 9 років тому

      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.

  • @xeno8555
    @xeno8555 10 років тому +1

    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!

    • @douggale5962
      @douggale5962 9 років тому +2

      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.

  • @meladpop1
    @meladpop1 10 років тому

    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 :)

  • @alpagutsencer
    @alpagutsencer 8 років тому

    Holly shit 30:50 that asking question guy is Jeremy Blumm i think :))

  • @mcr1981
    @mcr1981 11 років тому

    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.

  • @ece4760
    @ece4760  11 років тому

    Indeed it is.

  • @MMphego
    @MMphego 11 років тому

    Jerremy Blum @30:00

  • @mcr1981
    @mcr1981 11 років тому

    Thanks, will look into it. That was a fast response. Thanks.

  • @AbdullahKahramanPhD
    @AbdullahKahramanPhD 11 років тому

    Yes, he is.

  • @ssj4rit
    @ssj4rit 9 років тому

    Is this a graduate class?

    • @ece4760
      @ece4760  9 років тому +1

      +Ritz “ssj4rit” Tan This is a junior/senior class (third or fourth year) with some masters students (5th year).

  • @richardthompson3899
    @richardthompson3899 11 років тому

    He must be a smoker.