Code works on PIC 18F2550

I got the code to work on a PIC 18F2550 running at 48MHz on 3.3V and 300kHz I2C. I used Microchip's Student Edition C18 compiler and its library (the documentation is horrible) for controlling the hardware I2C on the chip. At 3.3V (I'm using a PICKit 2 programmer, which provides power from USB at 2.5V to 5.0V), the highest speed I got was 300kHz. Any higher and it would begin to output garbage. Also, I used only 1900 cycles, or about 158 microseconds, of delay between sending the 0x00 and reading data. 1800 cycles would not work.

Huge thanks to chad for the wiring, protocol, and sample code and Edward for the required delays and the lower-level code I needed for the PIC's MMSP module.

I can not post my code; I apologize in advance for anyone who needs it.

-Xo W.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.