News:

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

Main Menu

SHIn and SHOut

Started by streborc, Mar 07, 2026, 10:38 PM

Previous topic - Next topic

streborc

I conducted this same test on two other PIC devices, a 12F1840 and an 18F47Q10.  There was no difference in the SHIn behavior on the 12F1840.  However, SHIn does receive its input on the 18F47Q10.  I should note that the serial LCD I was using to display the three Reg_byteX values in my test did not want to work on the 18F47Q10's PortA where the SDI, SDO and SCK pins were assigned, and had to be moved to PortB -- maybe a read/modify/write collision?  (There was no such problem on the 12 or 16 devices.  I might investigate further.)

Is this exclusionary use of SHIn on the 12 and 16 PIC families by design, or is it by limitation of these less capable uC's?  Perhaps I should graduate all my projects to PIC18 devices(?).

streborc

Below are the assembly code excerpts for SHIn from the PIC18F47Q10 and PIC16F18346 test programs.

SHIn_Assembly_Code.png

trastikata

#22
Del

streborc

My last post was incomplete, and listed only the library code from the assembly file.  Below is the assembly code for the SHIn instruction Shin SDI, SCK, 0,[Reg_byte2]

SHIn_Assembly_Code.pdf 

trastikata

Hi,

Can you share the entire Assembler code, from beginning to the end for both working and not working programs and indicate the device in the name of the txt file.

Thank you.