TI545 bit compare

Kev77

Member
Join Date
Mar 2008
Location
Beaverton, Or
Posts
410
I need some help on comparing bits in a shift register. I have a "SHRB" bit shift register that has 16 bits. I need to know if any of the first 8 bits are set. What instruction would I use? I Is there an instruction for bit compare?

1 0 0 1 1 1 1 1 1 1 1 0 1 1 0 1
|__________|

Rung output on

Thanks,

Kevin
 
You could also add 2 additional words.
1 word w/ set to 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
then do a table to table AND instruction into a 3rd word. Then do a GTR 0, this will turn the output on if any of the first 8 bits are 1.

This assumes you don't need to examine exactly WHICH bit is non-zero.
 
cool, that works too. I also found a way using a "MIRW" move to word. I am using (IR) image register c150-c157, the bits in the register and moving them to v120. So if the any of the bits are set, the word will be greater then 0. I can then use an greater than instruction.

Thanks for the help. o_O
 
1. You could use the WAND instruction with a constant 1111111100000000. It will give a 1 for output if there are 1 among the first 8 bit.
2. You may also use MWIR to move bits in words to C locations,then use a "or" function.
 

Similar Topics

Any old TI545 boys or girls reading this? Something I never figured out. We have one RS232 serial connection between our PC and the 545 Port 1...
Replies
6
Views
1,305
Hey Guys and Gals, I have some a piece of old equipment that has a TI545 Siemans Processor and it is communicating with a Nematron IWS-2511T touch...
Replies
0
Views
2,505
I'm wondering if anyone has any insight into Siemens communications and may be able to help me with a communications problem I'm having? I have a...
Replies
4
Views
4,159
I'm trying unsuccessfully to control a steam regulator for drying cans with a TI545. I'm using WorkShop for programming. When I make a new loop...
Replies
4
Views
2,226
If I use Softshop to comm to a TI545, will a USB to serial plus null modem cable work or do I need a native serial port as with TISOFT?
Replies
2
Views
1,543
Back
Top Bottom