This question is for Bob Ammerman Bob I have figure out how to get the max7219 into decode mode for eight digits. I have added this after I set cs low. movlw 0xff movwf portb,1 ; set max7219 decode mode 8 digits I have been trying to interpret the data sheet it says that the lower nibble of the 16 bits is all that it looks at. The way the ckt board is laid out is that we have 8 sections laid out as digits with the individual segments laid out in sequential form. the max7219 is laid out to decode the digits then the individual segments are part of each digit. do I have to have a data table for each digit 0-7 except the last which is 0-4 I still haven't came up with a way to divide the time can you please point in the right direction thank you I really appreciate the help you have giving me Michael Johnston ----- Original Message ----- From: "Michael Johnston" To: Sent: Tuesday, May 28, 2002 11:26 PM Subject: Re: [PIC] Max7219 interfacing (was Shift Register Useage-TPIC6A595) > Bob > I adopted this snipet you gave me the other day and iv included the enitire > source file so you can see what i ve come up with. I think you where talking > about macros > when you usde the skpc and skpnc instructions. I think i have them right as > this what they cooresponded to in the assembler quick reference guide. > here is there problems i see number one is that i need to see data going to > the max7219 at all times well it doesn't appear to do this until the clock > sequence is counted up to each max. Ive shortened the sequnces so i can see > it increment. And when it decrements the count register it starts counting > from 255 to 0 when it gets here it starts over again > any suggestion are very appreciated > Thanks Again > Mike Johnston > ----- Original Message ----- > From: "Bob Ammerman" > To: > Sent: Thursday, May 16, 2002 6: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 > > > > 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