Hi to all,
i need a simple assembler code to send/receive data with i2c module (in master mode) on pic18f45k22 .
I have see application note AN735 but is old and written for Pic16 (can be ported to a pic18c...).
Does any of you have a simple working example written in assembler to send and receive data in I2c?
Welcome to ETO Emanuele . I am wondering why assembler ? . PIC18 instruction set is optimised for C . The C code gets turned into asm and compiled to HEX . What you need is doable but I see no advantage ...
Hi to all,
i need a simple assembler code to send/receive data with i2c module (in master mode) on pic18f45k22 .
I have see application note AN735 but is old and written for Pic16 (can be ported to a pic18c...).
Does any of you have a simple working example written in assembler to send and receive data in I2c?
Nigel Goodwin, member here, has published a series of tutorials. is precisely about I2C. It took me little time to implement two PICs linked through I2C.
Now that I think of it, IIRC, it is done bit-banging style. I think I did it with a 18F as well but not sure.
Sorry but my PC where all it is buried is defunct. No time to retrieve my data where my test is for the moment.
Thanks to all Max Atferrari Granddad ....this site is a precious resource for a designer,
now i will study on the basis of what you have suggested to me,
Hi Granddad you're right but i have to modify a program entirely written in assembler and I did not want to redo everything in c.
I design machines in esthetics field,
i tend to use the microcontrollers and the programming modes i already know, already tested even if in assembler.
I realize that it is wrong but many times there is little time for design and venturing with another processor or programming mode can be risky.
I am currently trying to learn stm32f429i-disk1 in C \ C ++ maybe i still need your help thanks to all.