So how exactally do I determine what this parameter maps to on a PIC specifications sheet.
I see parameters in the mikroBasic book like SPI_Init(100000)
I see nothing in the datasheet referring to 100000 (one hundred thousand) as being any kind of configuration parameter.
The PIC18F452 has a control register called SSPCON1, it has 3 bits SSPM3:SSPM0 that allow configuration of the mode and speed reletive to the Fosc. So I just want to know how the 100000 maps to these settings, or if it even does?
Thanks,
Chris
I2C_Init parameter
Re: I2C_Init parameter
Chris Yeager wrote:So how exactally do I determine what this parameter maps to on a PIC specifications sheet.
I see parameters in the mikroBasic book like SPI_Init(100000)
I see nothing in the datasheet referring to 100000 (one hundred thousand) as being any kind of configuration parameter.
The PIC18F452 has a control register called SSPCON1, it has 3 bits SSPM3:SSPM0 that allow configuration of the mode and speed reletive to the Fosc. So I just want to know how the 100000 maps to these settings, or if it even does?
Thanks,
Chris
Spi_init does not receive parameters. I assume that you meant I2C_init
like you have stated in subject.
If you read carefully datasheet you will see that speed setting is
clock = FOSC / (4 * (SSPADD+1))
SSPADD which is SSP Baud Rate Reload Register in I2C Master mode
which means that you control baudrate by writing corresponding value to it which is calculated based on argument that you have passed to init.
-
- Posts: 73
- Joined: 21 Sep 2005 04:23
You are right I did mean the I2C_Init. But I still dont know what the argument being passed to it means. The small amount of documentation on this I2C_Init command doesn't explain what the parameter is.
So I guess that is my real question.
Please explain the meaning of the parameter passed to the I2C_Init function. Is it the "clock" value you described in the previous answer?
Thanks,
Chris
So I guess that is my real question.
Please explain the meaning of the parameter passed to the I2C_Init function. Is it the "clock" value you described in the previous answer?
Thanks,
Chris