View previous topic :: View next topic |
Author |
Message |
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
I2C FORCE_HW |
Posted: Fri Jan 31, 2020 4:38 am |
|
|
Hi
I initialize I2C as below:
Code: | #use I2C(MASTER, Slow=50000, I2C1, FORCE_HW, STREAM=I2CPORT) |
&
Code: | #use I2C(MASTER, Slow=50000, I2C1, STREAM=I2CPORT) |
I checked both LST files and they are identical except the two lines above
My question is:
Need to specify FORCE_HW or not if I am using the port name?
Best wishes
Joe |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19589
|
|
Posted: Fri Jan 31, 2020 4:51 am |
|
|
No.
Using the physical port name on all of the peripherals (SPI, UART, I2C),
is equivalent to specifying the hardware pins, _and_ specifying 'FORCE_HW'. |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Fri Jan 31, 2020 5:43 am |
|
|
Thank you Ttelmah, helpful like always
Best wishes
Joe |
|
|
|