Newbie question - Datasheet and C

Jun 12, 2007 3 Replies

Hi All,



I am reading this datasheet for SE401 controller

formatting link
(page 11):


2.1 Power-Down Control Register

Address: 0xC00A


Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit



1 | Bit 0 reserved USB IRQ PUD1 PUD0 SUSPEND HALT

etc.



How can I use this hex address (0xC00A) together with these 8 bits in C to do something useful with a controller?



Thanks.



Dusan



controller

formatting link

There are 1,440,000 hits on "C bit manipulation".

formatting link

unsigned char *ptr; ptr = 0xC00A; // MAYBE

*ptr = 0xFF;

Read Your Compiler manual. The way to set a pointer with a fixed address is very compiler specific. you may need a macro or function to properly format the address.

formatting link

Hi,

Or :

*(unsigned char *)0xC00A = value ;

Yvan

********************** YBDesign
formatting link
**********************

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required