Anonymous
Not applicable
Sep 29, 2013
08:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 29, 2013
08:43 PM
Hi
In TD_poll() of slave.c of An61345 example firmware code,
The IOC used like this IOC |=0x01 But i dont understand.
As i know, The IOC 's i/o initial direction is used by input.
So IOC register can read on input direction, but example code show that IOC can write like this IOC |=0x01.
Is this something wrong what write data to input register ?
1 Reply
Anonymous
Not applicable
Sep 30, 2013
12:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 30, 2013
12:58 AM
Hi,
In fw.c you can see that PC.0 is configured as an Output pin and PC.1 as input as below:
OEC|=0x01; //PC.0 as output (SYNC signal)
SYNCDELAY;
OEC&=0xFD; //PC.1 as input (Clock changing signal)
SYNCDELAY;
It is the OEC register that determines which pin of port C acts as input, and which as output.
Regards,
Gayathri