Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/18/03 04:55
Read: times


 
#41753 - RE: p2 -- r0, r1
Responding to: ???'s previous message
Hi Steve,

Sorry it has taken me so long to respond, my father is in the hospital and the last few days have been hectic.

Ok...here it goes (unleashing the novel writer within me).

The scanner is transmitting at 16khz...which doesn't seem all that fast, but I am using a 12Mhz processor, divide that by 12 and I am effectively running at 1Mhz.

I am using an 87C55, so only 1 dptr. I have asked for samples of a Dallas variant that does have two dptrs but first they sent a surface mount chip, when I contacted them, they said they would send a DIP packaged chip. However, I have yet to hear anything back and time is running out on me so I am moving forward with what I have now.

As the barcode is being scanned in, I am having to run tests to strip off the unneeded bits (start bit, stop bit) and playing with parity. I am also having to run the test to make sure the barcode was scanned in correctly using the check byte at the end so this is taking up all of my time. In the beginning, I had to strip it down to bare bones, copy the signal to p1.0 so I could watch it on the oscilloscope and add instructions slowly to make sure I didn't lose any of the signal. I slowly added instructions and backed up if I lost part of the signal and found another way to do things.

Now, after the barcode is scanned, I convert from scan code (8 bits) to hex (4 bits) using a lookup table, squish two bytes into one byte and start my search algorithm (which I haven't finished yet, if anyone knows of any good ideas for a search algorithm using 1 dptr, I would love to hear about them). If the barcode isn't found, it is then stored in the permanent table, followed by a few other bytes of information.

So I did figure out that p2 doesn't change on me (as far as I have been able to tell).

One other question (if you haven't drifted off to sleep on me)...is there a way to "backup" the data pointer. For example, could I use

mov temp1, dpl
mov temp2, dph

and would this "back up" the data pointer so that when I needed to return to that specific point, I could reload it with the values?

mov dpl, temp1
mov dph, temp2

I ask this because in my search algorithm (which I haven't finished yet so can't test yet), I need to back up the data pointer. If the first number is a match, I test to see if the next number is a match. If it is not, I need to return to the first number and keep searching down the list, to do this, I need to have the dptr backed up. Does that make sense?

Thanks for making it this far and again, if I haven't been clear (my mind is fuzzy) ask and I will try to answer any questions.

..an

List of 9 messages in thread
TopicAuthorDate
p2 -- r0, r1            01/01/70 00:00      
   RE: p2 -- r0, r1            01/01/70 00:00      
   RE: p2 -- r0, r1            01/01/70 00:00      
      RE: p2 -- r0, r1            01/01/70 00:00      
         RE: p2 -- r0, r1            01/01/70 00:00      
            RE: p2 -- r0, r1            01/01/70 00:00      
               RE: p2 -- r0, r1            01/01/70 00:00      
                  RE: p2 -- r0, r1            01/01/70 00:00      
                     RE: p2 -- r0, r1            01/01/70 00:00      

Back to Subject List