Hi all, I'm just getting started with micro controllers, my first programmer and chips should be arriving later this week .
I'm teaching myself assembly language from various tutorials on the web. The one I'm currently using is from this site.
**broken link removed**
If you follow the link, it shows how to set up a delay loop to flash a LED. I think I understand everything there like: how the ports are set up, how the pins are alternately set high and low and why the delay loop is needed and how it works. The part that is confusing me, why is it not necessary to reset the values COUNT1 and COUNT2 after each loop.
According to the tutorial, the 2 register locations 08h and 09h start off with 255 in them and we are calling 08h COUNT1, and 09h COUNT2.
If decfsz COUNT1,1 keeps running over and over again until COUNT1 = 0, how can COUNT1 be used again in another loop without being reset to 255? What am I missing here?
Thanks for any help.
I'm teaching myself assembly language from various tutorials on the web. The one I'm currently using is from this site.
**broken link removed**
If you follow the link, it shows how to set up a delay loop to flash a LED. I think I understand everything there like: how the ports are set up, how the pins are alternately set high and low and why the delay loop is needed and how it works. The part that is confusing me, why is it not necessary to reset the values COUNT1 and COUNT2 after each loop.
According to the tutorial, the 2 register locations 08h and 09h start off with 255 in them and we are calling 08h COUNT1, and 09h COUNT2.
If decfsz COUNT1,1 keeps running over and over again until COUNT1 = 0, how can COUNT1 be used again in another loop without being reset to 255? What am I missing here?
Thanks for any help.