Welcome!
Welcome PIC fans! (to Pascal language fans too!) Technical
General documentation
How to support PMP Manuals
Tips
Other stuff
Documentation How to support PMP
Off Topic Today's favourites
Search
Downloads
The last 5 downloads
The last 5 most downloaded
|
Tips - The Read-Modify-Write problem on I/O ports
Here is an excellent article on this problem that everybody should be aware of. Next, if the problem is due to a capacitive load, some delay may be inserted between writes, to allow the cap to charge, but that's empirical and not bulletproof:
PORTA := 0; Next, if the problem is a only due to a capacitive load, we may wait until the cap has charged, but that would hang the processor if nothing happens:
PORTA := 0;
Finally, a bulletproof armor uses a shadow register:
where SHADA is a global byte variable that will reference / hold all manipulations on PORTA for the whole program and that is systematically copied to PORTA after each block of changes. Creation date : 2007.06.24 6:14 PM Reactions to this article
| Connection...
Members : 75
[ Password lost ? ] [ Join us ] Member online :
Anonymous online : 4
Total visits: 1703319
Most ever online
Total : 200
The 20/10/2024 @ 06:06 Webmaster - Infos
Ip: 3.139.235.177 Search
Friends News
Where are you from?
|