I²C Init with 18.432 Crystal

General discussion on mikroBasic.
Post Reply
Author
Message
Csaba
Posts: 238
Joined: 01 Jun 2007 16:25
Location: Switzerland/Spain
Contact:

I²C Init with 18.432 Crystal

#1 Post by Csaba » 23 Jun 2007 22:43

I am trying to initialize the I²C with a 18.432 Crystal. BUt can't figure out the value that should be there instead of the I2C_Init(100000) ?

xor
Posts: 5465
Joined: 18 May 2005 00:59
Location: NYC
Contact:

#2 Post by xor » 23 Jun 2007 23:45

I2C generally operates at the standard 100K speed. There is also 400K I2C. The compiler makes the calculations and adjustments at compile time based on the oscillator freq you have entered in your project.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]

Csaba
Posts: 238
Joined: 01 Jun 2007 16:25
Location: Switzerland/Spain
Contact:

There is a bug in the compiler

#3 Post by Csaba » 24 Jun 2007 00:14

When I use the 18F452 with 18.432 crystal I can use the RTCWrite.pbas example,
If I try to use the 16F877A MCU it fails to compile with Argument out of Range.
The reading part works of course on both MCU's with this particular crystal.
Might wanna look into that . You see I wanna Use USART with this Crystal and would need the RTC module as well. As well as the DS1820 .
I don't work on the PIC18F458 as well . This is frustrating :cry:

Post Reply

Return to “mikroBasic General”