Searching \ for '32 bit rotate' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=bit+rotate
Search entire site for: '32 bit rotate'.

Truncated match.
PICList Thread
'32 bit rotate'
1998\06\09@160434 by Pedro Barrios

flavicon
face
Hi everyone,

I'm trying to find a way of displaying a message in a 5x7 LED
array. Basically, I don't have a good idea of how this is
usually done, but since I have worked a little bit with the
16C84, I thought I give it a try.

I was thinking about having a message array 32 bits long by
5 bit wide containing the information I want to display. I would
then take each one of the 32 bit words and rotate sequentially
bit by bit and display the 7 most significant bits after each
rotation. I would do this for each of the 5 rows of the LED display.

I will appreciate any help on how I do this 32 bit rotation with
the PIC, and also any suggestions or comments as of how messages
can be displayed in LED display arrays with the PIC.


Best Regards,

Pedro

1998\06\10@004730 by paulb

flavicon
face
Pedro Barrios wrote:

> I'm trying to find a way of displaying a message in a 5x7 LED
> array.

 The "Times Square" display thread re-surfaces!

> I was thinking about having a message array 32 bits long by
> 5 bit wide containing the information I want to display.

 Which way up is the display?  Usually the 7 vertical and the 5
horizontal.  As such, you have described a vertical message stripe.
Surely not?  Or are you going to use it on its side, only five bits
high?

> I would then take each one of the 32 bit words and rotate sequentially
> bit by bit and display the 7 most significant bits after each
> rotation. I would do this for each of the 5 rows of the LED display.

 A way of driving a *single* 5 by 7 display, is to use an 8-bit shift
register (e.g. 74HC164) into which a column of 7 bits is loaded, the
column multiplexer is disabled, the latch in the SR is updated and the
new appropriate column enabled by multiplexer.  If you're really
cunning, do the column multiplexing with an HC4022 octal counter/decoder
whose clock is the latch enable and reset is the eighth bit of the shift
register.  Result: 3-bit interface to the PIC (data, shift clock,
latch).

 Code to do this and read character tables?  Well, best describe
exactly how you wish to view or scroll and what characters, first?

 Cheers,
       Paul B.

1998\06\10@074609 by Caisson

flavicon
face
> Van: Pedro Barrios <spam_OUTbarriosTakeThisOuTspamnanofab.physics.tamu.edu>
> Aan: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Onderwerp: 32 bit rotate
> Datum: dinsdag 9 juni 1998 20:59
>
> Hi everyone,
>
> I'm trying to find a way of displaying a message in a 5x7 LED
> array. Basically, I don't have a good idea of how this is
> usually done, but since I have worked a little bit with the
> 16C84, I thought I give it a try.
>
> I was thinking about having a message array 32 bits long by
> 5 bit wide containing the information I want to display. I would
> then take each one of the 32 bit words and rotate sequentially
> bit by bit and display the 7 most significant bits after each

And see a dark line every 8 leds (horizontal) ?  I would not do that.
Just shift every line (of 4 * 8 bits) one bit to the left. you could shift
the new data (one bit) in when shifting the right-most byte.  Repeat this
for every line.

> rotation. I would do this for each of the 5 rows of the LED display.
> I will appreciate any help on how I do this 32 bit rotation with
> the PIC, and also any suggestions or comments as of how messages
> can be displayed in LED display arrays with the PIC.
>
> Best Regards,
>
> Pedro

A 32-bit rotation (Left) :

movwf {data to shift in}
rrf {data to shift in}
rlf {line1+3}
rlf {line1+2}
rlf {line1+1}
rlf {line1+0}
rrf {data to shift in}
rlf {line2+3}
rlf {line2+2}
rlf {line2+1}
rlf {line2+0}

etc.

{data to shift in} contains 5 bit of data.  Bit 0 is the bit shifted into
line #1. Bit 1 is the bit shifted into line #2. etc etc etc.

{Line1+3} is the right-most byte to be displayed (bit 0 at the right-most
position, bit 7 at the left-most).

Greetz,
 Rudy Wieser

P.s.
 Need more info ?  Just tell me.

1998\06\10@152657 by Pedro Barrios

flavicon
face
Hi Rudy,

Why do you think I'll be seeing a dark line. I think that as
long as the 8 bit word keeps shifting a bit at a time, I'll
always be able to see the entire message.

{Quote hidden}

Why are you using the rrf instruction?


{Quote hidden}

What 5 bits here are you talking about?


{Quote hidden}

1998\06\11@073203 by Caisson
flavicon
face
> Van: Pedro Barrios <barriosspamKILLspamnanofab.physics.tamu.edu>
> Aan: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
> Onderwerp: Re: 32 bit rotate
> Datum: woensdag 10 juni 1998 21:22
>
> Hi Rudy,
>
> Why do you think I'll be seeing a dark line. I think that as
> long as the 8 bit word keeps shifting a bit at a time, I'll
> always be able to see the entire message.

I thought you had a 5 high and 7 wide char, and would display it on a 5 * 8
(* 4 chars) display, thus never using every 8th (vertical) row of leds. I
got confused ...

[Cut]

> Why are you using the rrf instruction?

The byte in the W register is one (1) vertical line of data. Bit 0 contains
the top-most bit of your character, Bit 1 the bit below the first, and so
on. This means that bit 0 should be shifted in into line #1 (horizontal),
bit 1 into line #2, etc.  By way of shifting to the right the bits
(formerly in the W register) will be shifted into the Carry, and than can
be shifted into the apropriate line.

[Cut]

> >{data to shift in} contains 5 bit of data.  Bit 0 is the bit shifted
into
> >line #1. Bit 1 is the bit shifted into line #2. etc etc etc.
>
>                 ^
>                 |
> What 5 bits here are you talking about?

As I said, I was thinking about a 5 high and 7 wide character. wich is, at
best, not very readable ....

[Cut]

Greetz,
 Rudy Wieser

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...