Just need to clarify...


Results 1 to 15 of 15

Threaded View

  1. #13
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default reply to Al

    Al, closer but not there yet. Sorry for the delay, I had to adjust your code to invert the Collumn port for this display. Bruce I haven't tested yours yet but I had started in that direction.

    Bitgenerator:
    Bvar=-0
    random Ran_Word
    Avar= Ran_Word.byte0
    if Avar.0=1 then Bvar=Bvar+1
    if Avar.1=1 then Bvar=Bvar+2
    if Avar.2=1 then Bvar=Bvar+4 ;isolate a random number 0to7
    Cvar=1
    Cvar=Cvar<<Bvar ;set a single bit in the byte
    Cvar=Cvar^$FF ;invert for a low on one bit
    rcol=Cvar ;set port
    Bvar=0
    random Ran_Word
    Avar= Ran_Word.byte0
    if Avar.0=1 then Bvar=Bvar+1
    if Avar.1=1 then Bvar=Bvar+2
    if Avar.2=1 then Bvar=Bvar+4
    Cvar=1
    Cvar=Cvar<<Bvar
    Row=Cvar
    pause 100
    goto Bitgenerator

    (Wierd: code tag nor the editor would accept << in the code)


    this method works (sorry you can't see all the code) but gives some repetition in general pattern on the diagonal. I will use the DCD. I'm still trying to understand Al's "Ran_Word.0[AA0 + 8]" . What is this doing to the PortC.0[AA0], is it resetting to a number less than 8?
    thanks guys, I'll have to chew on this for a while.
    Last edited by MOUNTAIN747; - 30th March 2010 at 21:05. Reason: post editor doesn't like <<

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts