Page 1 of 1

How do I modify SSPADD registry with Supplementary Code?

Posted: Sun Jul 31, 2022 11:08 am
by Tortilla
Hello,

I need to set a slower speed for the I2C bus which I have calculated would require the SSPADD registry of my 18LF2550 to be set to 0x63.

I have tried to add some supplementary code defining SSPADD = 0x63. However, the compiler rejects this one line of code.

Can someone help me with the right code to add to the supplementary code section of the Project Options?

Thanks!

Re: How do I modify SSPADD registry with Supplementary Code?

Posted: Sun Jul 31, 2022 3:28 pm
by LeighM
Hi,
Supplementary code section is for functions.

Code: Select all

SSPADD = 0x63;  
Would need to go into a C icon, after the I2C component initialisation.

btw. It is possible to set a custom baud rate in the I2C component

Re: How do I modify SSPADD registry with Supplementary Code?

Posted: Mon Aug 01, 2022 8:48 am
by Tortilla
Ah, thank you for that. No wonder I couldn't set it that way.

I will try to do it in a C icon and also look in to doing it in the I2C component.

Best,

Dan