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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/17/08 21:07
Read: times


 
#150963 - For loop parsing with a rising edge write
I'm having a conceptual problem. I am using port 0 to control a alphanumberic decoder ic. It uses 6 data lines for the 64 char matrix character generation. Assuming D0-D7, D0-D5 are the data lines D6 is the write line, and D7 is the clear line.

I'm using a 10 pin ribbon cable and have found that I don't want to rev the board to use port 1-3 for the control write/clear function (when I designed it, I overlooked the need for the rising edge and thought it was level triggered not edge trigger per the datasheet). I need to mask a string parse and have the write line toggle for a rising edge for each position of the array string to send the data into the latch.

My C code works in the simulator and masks the string ascii with the matrix table values from the decoders ascii sheet (ICM7243BIPL), so my letter A is 01h, B is 02h and so forth. If I run the code in a simulator it works exactly as I expect, the problem is that I need to have bit D6 (the write line) to toggle a rising edge for each character that is parsed in the array. I could use another port, but I don't want/can have the drive to redesign the whole thing again. Here is the code:

while(1)
 {		
  {				
					
    unsigned char string1[]="ABCDEFG";
    unsigned char z;
    for (z=0;z<=7;z++)					
    P0 = (0xBF & string1[z]);
								
  }
 }


I've tried to bitwise mask a 0x40h with the string1[z], but then it corrupts the data stream to the port. I've tried an unsigned char varirable and then mask that, but it just outputs some junk that doesn't work.

Is there a way to have the "for" loop break out of each character array during parse to include toggling D6 so that I can get the data to latch into the decoder?

Thanks...

Chris






List of 13 messages in thread
TopicAuthorDate
For loop parsing with a rising edge write            01/01/70 00:00      
   Forgot to mention            01/01/70 00:00      
      Not sure how it should work...            01/01/70 00:00      
   I don't quite understand what's your problem...            01/01/70 00:00      
      Better clarification of error I hope...            01/01/70 00:00      
      No, it would not work            01/01/70 00:00      
         yeah. my bad...            01/01/70 00:00      
   No problem here            01/01/70 00:00      
   Is the string fixed or variable length ?            01/01/70 00:00      
      Ment to mention            01/01/70 00:00      
   Oh - I C            01/01/70 00:00      
      I have the answer thanks to you folks...:)            01/01/70 00:00      
   sounds like missing pullups            01/01/70 00:00      

Back to Subject List