Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Correct IO coding scheme? CS8900A

2005-11-02 by rseku

My question is regarding good habbits of manipuating IO's.
In the freertos environment I'm toggling output bits as
(relevant code marked with ***)

while(....){
*** IO0CLR = ADDRESS_BUS;                              // Put address on bus
   IO0SET = addr << ADDRESS_OFFSET;

   IO0CLR = IOR;                                   // IOR-signal low
   value = (IO0PIN >> DATA_OFFSET) & 0xFF;    // get low order byte from 
data bus
   IO0SET = IOR;

***  IO0SET = 1 << ADDRESS_OFFSET;
............................
}
During debugging I see proper CLR intr. execution at the begin of while(){}.
But somewhere in the middle first SET instruction is presuming the bits 
are cleared.
But when watching IO register status there seems the bits are no longer 
cleared.
Does it has sth to do with debugging, or RTOS ( which in fact doesn't 
play with bits at all anywhere else)?

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.