News:

Let's find out together what makes a PIC Tick!

Main Menu

Shin Command Issue

Started by GDeSantis, Today at 06:44 PM

Previous topic - Next topic

GDeSantis

I am working on a project that uses an MCP3550 22-Bit Delta-Sigma ADC.  When extracting raw ADC data from the MCP3550 in SPI mode 0,0 data is acquired in 4 byte transfers as noted in attached Image_1.

In my Positron program, where ADC_DATA is a Dword, I would like to use the following command:

SHIn SDO,SCK,0,[ADC_DATA\32]

Unfortunately the Shin command is limited to 16 bits as follows:

SHIn SDO,SCK,0,[ADC_DATA\16]

How do I work around this issue?

trastikata

Hi,

hope this helps:

SHIn SDO,SCK,0,[ADC_DATA.Word1\16,ADC_DATA.Word0\16]

GDeSantis

After seeing your proposal, I reviewed the Positron Compiler user manual and saw that the Shin command can be used with multiple variables.

Having said this, I was impressed with your proposal and thank you for the quick response.