----- Original Message ----- From: "Michael Johnston" To: Sent: Wednesday, June 05, 2002 12:28 AM Subject: Re: [PIC] Max7219 interfacing (was Shift Register Useage-TPIC6A595) > 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 No, this isn't right. You have to send the 'decode mode' command to the chip using the normal shift routine. > 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. You should not need such a table if you are using the decode mode of the 7219. However, if you haven't wired the segments up in the order that the 7219 assumes, you will have to do the decoding in the PIC and not use decode mode on the 7219. > I still > haven't came up with a way to divide the time can you please point in the > right direction. Sure. You are currently have 3 variables, one for seconds, one for minutes, one for hours. You can change to using separate variables for the units and tens digits of each of these values. You would use the same increment-and-check-against-a-limit logic, the the limits would now be: 10 for the seconds units digit 6 for the seconds tens digit 10 for the minutes units digit 6 for the minutes tens digit The hours get tricky depending on how you want to count them: 12 hour vs. 24 hour, etc. > thank you > I really appreciate the help you have giving me Keep working on it. Bob -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu