The LED Blinky program causes the LED to flash asymmetrically - why is this and how can it be fixed?

By Julian

Youtuber, shed dweller, solar charge controller aficionado

12 thoughts on “Pic assembly language update: #2.1 – blink symmetry”
  1. Avataaar/Circle Created with python_avatars Phil M says:

    What no continuation of the boss employee parody. "Sorry boss! in my eagerness to bodge/ finish the product on time we now have to recall all those units But i don't worry ill forfeit my bonus …forever to cover the cost" 🙂

  2. Avataaar/Circle Created with python_avatars himselfe says:

    Glad to see you returning to the PIC tutorials. I was slightly concerned the threat of being burned at the stake had put you off! o:D

  3. Avataaar/Circle Created with python_avatars T Komoski says:

    Operand

  4. Avataaar/Circle Created with python_avatars Chris Shipman says:

    I think that you have a very nice mix of videos at the moment. A very nice balance of education, information and entertainment.

  5. Avataaar/Circle Created with python_avatars Mad Hatter says:

    The only reason I watch this cringe worthy wanna be is I'm waiting to see him bridge a connection with that pencil, trust me it will happen sooner or later, a pencil shouldn't be used to point at live sensitive electronic devices, makes me wonder does Europe have a shortage of coffee stirrers, you don't make enough from your Patreon account to purchase a plastic pointer pen, if any electronics company saw you doing this you'd be making YouTube videos ………………… oops.! too late, don't ever complain about how IC chips are being shipped in Styrofoam and static discharge when your holding a pencil above active electronics, cringe worthy content, for the love of all that's holy Google please stop recommending this clowns videos to me, I'm begging you stop I can't take it anymore, I don't want to see this clown or watch him repeatedly use other peoples code to make a light flash on a board over and over and over again, repeat content, OK everyone gets it you can make a light flash …………. WOW.! lets see your next trick, blowing a IC chip by bridging the connection with your pencil, can't wait to see if he would actually put that video up……

  6. Avataaar/Circle Created with python_avatars fredlllll says:

    i would be interested to see at what voltage the pic would still run at such a slow clock

  7. Avataaar/Circle Created with python_avatars joinedupjon says:

    My first thought was to tell your employer the low duty cycle is an energy saving feature… if he/she thinks slowing the oscillator down that much is legit they'll probably believe anything 🙂

  8. Avataaar/Circle Created with python_avatars John Jones says:

    Thanks again for posting these tutorials, Julian. Microcontrollers, like computers before them, have become more and more basically appliances that with a little prodding/copying/pasting do something useful. Too little time is spent understanding just HOW these devices do what they do. IMHO, high level languages, while very useful, have dumbed down the user. I for one appreciate learning the nitty gritty basics, even if I still continue to use a high level language for day-to-day projects. Looking forward to future installments.

  9. Avataaar/Circle Created with python_avatars JasonMasters says:

    Julian's next video will illustrate why a GOTO takes 2 machine cycles to execute. In the mean time, I'll explain it in words just in case anyone is impatient enough to want the information now but patient enough to wade through my lengthy prose. 🙂

    All instructions actually take 2 machine cycles to execute because one machine cycle is needed to fetch the instruction and one more machine cycle is needed to execute (carry out) the instruction. The one-cycle execution is possible because the Central Processing Unit inside the chip pre-fetches the next instruction while it's executing the current instruction. Pre-fetching the next instruction while executing the current instruction means the CPU usually doesn't have to wait one machine cycle before executing the next instruction. It's literally doing two things at once.

    But when a GOTO comes along, the CPU will almost always have to restart program execution at a location other than the next one, so it can't execute the instruction which it has pre-fetched. The CPU has to throw away the instruction it has pre-fetched then it takes one machine cycle to fetch the instruction from the location it just jumped to, then it can begin execution of that instruction on the second machine cycle after the jump (while once again pre-fetching the next instruction).

    And yes, this does mean that the first instruction after a reset also takes two machine cycles to execute, because it can't be pre-fetched.

  10. Avataaar/Circle Created with python_avatars Thiwanka Wimalasuriya says:

    thanks

  11. Avataaar/Circle Created with python_avatars douro20 says:

    How about an exercise for calculating the delay at 4MHz?

  12. Avataaar/Circle Created with python_avatars Raymond Heath says:

    Is the BSF GPIO, 0 supposed to be 1?oops, sorry, that's the bit, my bad

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.