News:

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

Main Menu

Request for Shin command modification

Started by GDeSantis, Oct 16, 2024, 08:29 PM

Previous topic - Next topic

GDeSantis

Per the Positron 8-Bit manual, the syntax for the inline Shin command is as follows:

     Var = Shin Data_Pin, Clk_Pin, mode, shifts

Where "shifts" informs the Shin command how many bits to shift into the assigned variable and can be specified from 1 to 16.

Since I would like to use the Shin command to clock out data from a 22 bit ADC, the 16-bit limitation is a problem. 

Moreover, since I am looking at other applications where a 32 bit shift would be required, please consider a Shin command modification on a future Positron update.

Frizie

You can split a DWORD variable, right?
Suppose you want to receive 32 bits in DWORD MyDword.
You will get something like:

Shin Data_Pin, Clk_Pin, mode, [MyDword.LowWord\16, MyDword.HighWord\16]
Ohm sweet Ohm | www.picbasic.nl

GDeSantis

#2
I checked your suggestion and it seems to work very well.  Thank you.