Bob Ive been trying to figure out how to do this with the maz7219. Do I need to keep cs low at all times or does it toggle back and forth every 16 bits. also what i need know is i have set up two registier to do a 16 bit rrf to stuff info in and pull it out for display. Do i set the cs low right after i initialize porta and b ? I am not making much sense out of the data sheet either, any suggestions would be very appreciated thank you Michael Johnston ----- Original Message ----- From: "Bob Ammerman" To: Sent: Thursday, May 16, 2002 6:45 PM Subject: Re: [PIC] Max7219 interfacing (was Shift Register Useage-TPIC6A595) > ----- Original Message ----- > From: "Bob Ammerman" > To: > Sent: Thursday, May 16, 2002 7:40 PM > Subject: Re: [PIC] Max7219 interfacing (was Shift Register Useage-TPIC6A595) > > > > You need a very similar technique, but not identical technique > > > > Using the 3-wire interface you would: > > > > set CS to zero > > > > for each of 16 bits: > > output data bit to data pin > > set CLK hi > > set CLK lo > > end for > > > > lower CS > > oops...... that last should be: > > set CS to one > > > > Bob Ammerman > > RAm Systems > > > > ----- Original Message ----- > > From: "Michael Johnston" > > To: > > Sent: Thursday, May 16, 2002 6:49 PM > > Subject: Re: [PIC] Shift Register Useage-TPIC6A595 > > > > > > > Bob > > > Could i use this code for a max7219 ic to display time? > > > My clock uses this chip to display time like a regular clock > > > Thanks > > > Mike Johnston > > > ----- Original Message ----- > > > From: "Bob Blick" > > > To: > > > Sent: Thursday, May 16, 2002 2:09 PM > > > Subject: Re: [PIC] Shift Register Useage-TPIC6A595 > > > > > > > > > > Try this, it is set to drive two '595 registers in series, and follow > > Bob > > > > A's other instructions. > > > > > > > > You can expand or shrink it as you desire. > > > > > > > > I did not need any delays at 4 MHz, you might need a nop here or there > > at > > > > 20MHz > > > > > > > > Cheers, > > > > > > > > Bob Blick > > > > > > > > ; SRDATA on PORTB,7 > > > > ; SRCLOCK on PORTB,6 > > > > ; SROUT on PORTB,5 > > > > ; data to send in srlo,srhi > > > > ; uses temporary register "count" > > > > ; does not trash srlo or srhi > > > > > > > > movlw 0x11 ; 17 decimal > > > > movwf count > > > > goto ROTATE > > > > LOOP: > > > > bsf 6,6 ; toggle clock > > > > bcf 6,6 > > > > ROTATE: > > > > rrf srhi ; rotate right > > > > rrf srlo ; rotate into carry > > > > btfsc 3,0 ; test carry > > > > bsf 6,7 ; set pin if carry > > > > btfss 3,0 ; test carry > > > > bcf 6,7 ; clear pin if not carry > > > > decfsz count > > > > goto LOOP > > > > bsf 6,5 ; toggle output register > > > > bcf 6,5 > > > > return > > > > > > > > -- > > > > http://www.piclist.com hint: To leave the PICList > > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > -- > > > http://www.piclist.com hint: To leave the PICList > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics