3/9/2015 TEB Update

What I accomplished this week

This week, I wrote the new code with the external interrupts implemented. If you read my post last week, you’ll know in the previous iteration, there was a large delay in program response when the buttons were pressed. The push buttons are now connected to the external interrupts on the AVR so this hardware solution should help eliminate the delay issues. For those of you who don’t know, external interrupts are a feature processors have to eliminate the slow timing of the polling process of I/O devices. The protocol usually is something like this

  1. The processor notices a state change on the interrupt pin.
  2. The main loop stops what its doing and saves its current state
  3. The Interrupt Service Routine (special kind of function) executes its code
  4. Data from the the ISR is transferred to the main loop using global variable
  5. Main loop starts where it left off with the data change

Of course, it is much more complicated than that on a hardware level, but that is the general idea

So I have my program set up where the push buttons are connected to the two external interrupts and then a push button counter that keeps track of which of the two push buttons have been pressed and how many time. The range is (-3, 3) with -3 being the coolest level and 3 being the warmest level so there are 3 cooling levels, 3 heating levels, and 0 is neutral (off).  I have two different ISRs, one to increase the value of the counter and the other to decrease it. And then there is the main loop, which sets the pulse frequency and LED level depending on the value of the counter.

I compiled the code and received no syntax errors.

Next week’s work

I would like to test the code on the board and fix any bugs with it. I am also going to meet with Professor Kevin Ponto to see if my code is as efficient and concise as it can possibly be.

 

This entry was posted in TEB- A thermoelectric bracelet to improve personal thermal comfort by sylvestre. Bookmark the permalink.

About sylvestre

My name is Jason Sylvestre and I am currently a freshman studying Electrical Engineering here at UW-Madison.  While in high school, I was very involved in search and rescue robotics research and competed at the Intel Science and Engineering Fair where I received a third place medal out of nearly 1800 students from over 70 different countries.  This passion I developed for circuitry and EE brought me to the Living Environments Laboratory where I will be working under the supervision of Professor Kevin Ponto to build a thermoelectric bracelet that can be used for personal thermal comfort.