BASIC SC16IS752 C software needed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BASIC SC16IS752 C software needed

1,017 Views
dfansler
Contributor II

Hello - I am trying to set up a SC16IS752 to received data on channel A in a polled environment using I2C.  I have looked thru many examples posted online, but most all seem to be full blown do everything the chip can do examples.  Far more complicated than I need.  Can anyone point me to a simple how to read data coming in on channel A in a polled I2C environment?

As I have it, the code I have setup does write to the IC without error - but the chip does not do anything.  BTW, using i2cdetect -y 1, the i2c address of the chip is 0x4d.

Many thanks to all who read and especially those who respond . . . 

David

David V. Fansler
Solo sailed Atlantic 2022
YouTube "Sailing Solo at 70"

0 Kudos
Reply
2 Replies

958 Views
dfansler
Contributor II

Thanks for your response.  The processor is a Raspberry Pi 4, running the Bookworm OS.  The Pi has a UART, but the changes made in Bookworm have killed a lot of the I/O and no one seems to be able to find a complete fix.  I need to read data from a GPS for this project.  With the Pi's UART being difficult to program, I found the SC16IS752 on Amazon,, with a 1.8432MHx Crystaloo a small board.  I used double sided tape to mount the small board on my HAT for the Pi.

SC16IS752             To HAT
SCL                        Pi SCL
SDA                        Pi SDA
Vin                         +5v\
Gnd                      pi Gnd
I2C/nSPI               Pi Gnd
A0                         Pi Gnd
A1                          Pi Gnd
nIRQ                     not connected
RxA                       GPS serial out

I looked at the bare bones code previously, but will look again.

Thanks again

David

0 Kudos
Reply

965 Views
ErikaC
NXP TechSupport
NXP TechSupport

Hello,

Would it be possible for you to share your schematic and setup details? What is the microcontroller you're using?

For reference, please take a look at this example project:
SC16IS752 Bare-metal Example Project

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2158570%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBASIC%20SC16IS752%20C%20software%20needed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2158570%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20-%20I%20am%20trying%20to%20set%20up%20a%20SC16IS752%20to%20received%20data%20on%20channel%20A%20in%20a%20polled%20environment%20using%20I2C.%26nbsp%3B%20I%20have%20looked%20thru%20many%20examples%20posted%20online%2C%20but%20most%20all%20seem%20to%20be%20full%20blown%20do%20everything%20the%20chip%20can%20do%20examples.%26nbsp%3B%20Far%20more%20complicated%20than%20I%20need.%26nbsp%3B%20Can%20anyone%20point%20me%20to%20a%20simple%20how%20to%20read%20data%20coming%20in%20on%20channel%20A%20in%20a%20polled%20I2C%20environment%3F%3C%2FP%3E%3CP%3EAs%20I%20have%20it%2C%20the%20code%20I%20have%20setup%20does%20write%20to%20the%20IC%20without%20error%20-%20but%20the%20chip%20does%20not%20do%20anything.%26nbsp%3B%20BTW%2C%20using%20i2cdetect%20-y%201%2C%20the%20i2c%20address%20of%20the%20chip%20is%200x4d.%3C%2FP%3E%3CP%3EMany%20thanks%20to%20all%20who%20read%20and%20especially%20those%20who%20respond%20.%20.%20.%26nbsp%3B%3C%2FP%3E%3CP%3EDavid%3C%2FP%3E%3CP%3EDavid%20V.%20Fansler%3CBR%20%2F%3ESolo%20sailed%20Atlantic%202022%3CBR%20%2F%3EYouTube%20%22Sailing%20Solo%20at%2070%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2159311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20BASIC%20SC16IS752%20C%20software%20needed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2159311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20for%20your%20response.%26nbsp%3B%20The%20processor%20is%20a%20Raspberry%20Pi%204%2C%20running%20the%20Bookworm%20OS.%26nbsp%3B%20The%20Pi%20has%20a%20UART%2C%20but%20the%20changes%20made%20in%20Bookworm%20have%20killed%20a%20lot%20of%20the%20I%2FO%20and%20no%20one%20seems%20to%20be%20able%20to%20find%20a%20complete%20fix.%26nbsp%3B%20I%20need%20to%20read%20data%20from%20a%20GPS%20for%20this%20project.%26nbsp%3B%20With%20the%20Pi's%20UART%20being%20difficult%20to%20program%2C%20I%20found%20the%20SC16IS752%20on%20Amazon%2C%2C%20with%20a%201.8432MHx%20Crystaloo%20a%20small%20board.%26nbsp%3B%20I%20used%20double%20sided%20tape%20to%20mount%20the%20small%20board%20on%20my%20HAT%20for%20the%20Pi.%3C%2FP%3E%3CP%3ESC16IS752%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BTo%20HAT%3CBR%20%2F%3ESCL%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Pi%20SCL%3CBR%20%2F%3ESDA%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Pi%20SDA%3CBR%20%2F%3EVin%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%2B5v%5C%3CBR%20%2F%3EGnd%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20pi%20Gnd%3CBR%20%2F%3EI2C%2FnSPI%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BPi%20Gnd%3CBR%20%2F%3EA0%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BPi%20Gnd%3CBR%20%2F%3EA1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Pi%20Gnd%3CBR%20%2F%3EnIRQ%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3Bnot%20connected%3CBR%20%2F%3ERxA%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BGPS%20serial%20out%3C%2FP%3E%3CP%3EI%20looked%20at%20the%20bare%20bones%20code%20previously%2C%20but%20will%20look%20again.%3C%2FP%3E%3CP%3EThanks%20again%3C%2FP%3E%3CP%3EDavid%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2159282%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20BASIC%20SC16IS752%20C%20software%20needed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2159282%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EWould%20it%20be%20possible%20for%20you%20to%20share%20your%20schematic%20and%20setup%20details%3F%20What%20is%20the%20microcontroller%20you're%20using%3F%3C%2FP%3E%0A%3CP%3EFor%20reference%2C%20please%20take%20a%20look%20at%20this%20example%20project%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FOther-NXP-Products-Knowledge%2FSC16IS752-Bare-metal-example-project%2Fta-p%2F1105691%22%20target%3D%22_self%22%3ESC16IS752%20Bare-metal%20Example%20Project%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E