Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (21)

Sign In or Sign Up now to post a comment!
  • wait nevermind you said it in the beginning. you're a genius.

  • @Azlateen Not a problem.

  • correct me if i'm wrong, but is this basically PWM on any non-PWM pin??

  • @Azlateen Yes. And you caught on to the simplicity. Engineers make PWM sound so complicated, but it's just a "regular" on and off signal. Enjoy.

  • @anajonesr Yeah it's really simple. Although I'm using it to fade an LED, and I'm using an ADC conversion to adjust the time the pulse is OFF. The problem I'm having is as I turn a pot to adjust the ADC input, the output on the non-PWN pin is really choppy. I turn real slow, and it dims like it should, but there are points where it just completely turns off. Any thoughts?

  • @Azlateen If it is not a bad connection, there is something in the program that you are overlooking

  • I would like to thank you for your continued thoughtful presentation of beneficial education material. You have greatly reduced the time the rest of us will need to get up and running on our own project. Thank you for your leg work.

  • for your list DS18B20 TC74 PCF8591P DS1307 SHT11 DS1869 ENC28J60 ADE7763 ACS712ELCTR-30A-T 24C08 PCF8583P
  • @bagatelox Thanks.

  • robotypic blogspot com

    Good experiments to study, with proteus. Can you 'translate' that to AVR?

    Another cool thing would be to take examples of application with arduino and implement with Mega32.

  • @bagatelox I don't think that would be a problem. I will add that to the list.

    Regarding the Arduino. I find it amusing that a conversion is desired as the main MCU for Arduino is the AVR. I like the idea, as it would bring the Arduino lovers back to basics.

  • You could teach how to control many seven segment display using the 74HC595 instead of using multiplexing.

  • @bagatelox I'm getting to that. I have that as a planned tutorial on the home page of newbiehack. Thanks.

  • @13:23 about being efficient with the microcontroller:

    if (TCNT1 >= 800 && TCNT1 <= 2400) { //perform code1 }

    if (TCNT1 < 800 || TCNT1 > 2400) { //perform code2 }

    I believe (and please correct me if i'm wrong) that:

    if (TCNT1 >= 800 && TCNT1 <= 2400) { //perform code1 } else { //perform code2 }

    Will do exactly the same BUT it wont, as the first example, run and check the second statement, if the first one is true. This way you save the microcontroller a lot of cycles.

  • Sorry for the < and > but im not able to write the signs (less than and greater than) on youtube, so i tried to use the html characters for it, but this didn't work as well :/

  • @TheDragothica Yes, that is a very good method to exclude the second condition, and it will work if the state machine will only have two conditions. I'm still investigating even more efficient code for code that requires multiple divisions of activity, and with responses like yours, I'm sure we will get there quicker. Thanks for the comment.

  • Thanks for clearing this up for me.

  • @amtpdb1 Also, most of the AVR MCUs are very similar, so the changes from one to the other may just be in pin locations on the chip. The program will only change in a minor way, if at all.

  • Will any of the atmega32 chips work with all the programs you have written so far or is there one in particular that is to be used? I ask this as for some reason I thought you were using a atmega32-16pu in the beginning and it looks like you are using a 324p now. Will either one work?

    Thanks

  • @amtpdb1 Yes, either one will work and I in the video, I note if there is a change, like the TIMSK register in this video.

  • 1st?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more