Newbie question - Datasheet and C

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

Reply to
sukovic
Loading thread data ...

controller

formatting link

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

Reply to
linnix

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.

Reply to
Neil

formatting link

Hi,

Or :

*(unsigned char *)0xC00A = value ;

Yvan

********************** YBDesign
formatting link
**********************
Reply to
Yvan BOURNE

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.