How do I modify SSPADD registry with Supplementary Code?

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Tortilla
Posts: 17
http://meble-kuchenne.info.pl
Joined: Tue Jul 05, 2022 8:54 am
Has thanked: 9 times
Been thanked: 3 times

How do I modify SSPADD registry with Supplementary Code?

Post 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!

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

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

Post 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

Tortilla
Posts: 17
Joined: Tue Jul 05, 2022 8:54 am
Has thanked: 9 times
Been thanked: 3 times

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

Post 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

Post Reply