Reply by Gary...@aol.com December 3, 20082008-12-03
On Nov 30, 3:02=A0pm, "Morgan" <morgan...@gmail.com> wrote:
> Hey all, > > I'm new to microcontrollers and I need to program my microchip PIC18F2321 > to communicate via I2C with a processor so I can turn the radio's power o=
n
> or off or set a specific frequency for the radio to operate on. > > I read microchip's sample code for programming master mode as well as the > AN734 doc. I'm still confused as to what to do. I've never done any > hardware programming before other than simple projects in LC-3 assembly i=
n
> college. > > Does anyone have any example code on how to set your device to be the > slave and let it talk to the master I2C in C programming language and NOT > assembler? (How do you even determine the address of the node?) > > Thanks so much! Happy Thanksgiving! > > Morgan
Different C compilers might have different ways to access the registers. There is probably some documentation on how to do that that came for the C compiler you are using. Some C compilers let you stick in assembly language code as well. I couldn't find a datasheet on the 18F2321.
Reply by Morgan November 30, 20082008-11-30
Hey all,

I'm new to microcontrollers and I need to program my microchip PIC18F2321
to communicate via I2C with a processor so I can turn the radio's power on
or off or set a specific frequency for the radio to operate on. 

I read microchip's sample code for programming master mode as well as the
AN734 doc. I'm still confused as to what to do. I've never done any
hardware programming before other than simple projects in LC-3 assembly in
college.

Does anyone have any example code on how to set your device to be the
slave and let it talk to the master I2C in C programming language and NOT
assembler? (How do you even determine the address of the node?)

Thanks so much! Happy Thanksgiving!

Morgan