Byron, thank you for your reply. You have given me several things to think about. After seeing your code snippet, I have decided I should really try to work out this whole problem myself instead of hacking up a complete piece of code I found from Microchip. I have started to sketch out the problem in pseudo code. > Here's a brain plant for you to think about later on. While assembly is > essential to learn, both for reading other's programs and for high > performance computing, Having abstraction for simple projects can really > help. Abstraction is something I have considered. When I write my own code, I usually sketch everything out in pseudo code that resembles C. Then I write the Assembly code a chunk at a time. A step beyond this would be to actually use a higher level language. For this project, I would like to stick to Assembly because that's the first language I have any experience with on the PIC and it is helping me understand how the chip actually works. But, I will look into the languages you list on your web page at http://www.finitesite.com/d3jsys/languages.html. Up until now, JAL is the only one of the three I have heard of. > CBLOCK 0x2C ; CBLOCK will auto the address. > ; 0x2C works for most 16F style pics. > display ; Make sure to init to 0 > ENDC > Update incf display,W ; Next display > andlw 0x03 ; Keep in range > movwf display ; And stick it back in display > clrf PCLATH ; Paranoia. Keep in 1st page > call disp2bit ; Convert to a bit number > movwf PORTA ; and write to port A. > return ; C-YA! > ; disp2bit presumes a couple of things. One is that W has the display > number. > ; Two is that PCLATH is cleared. Fix as necessary. > disp2bit > andlw 0x03 ; Paranoia. Just in case W > 3 > addwf PCL,F ; Jump table add > retlw 0x0E ; Clear PORTA:0 > retlw 0x0D ; Clear PORTA:1 > retlw 0x0B ; Clear PORTA:2 > retlw 0x07 ; Clear PORTA:3 Has someone on this PICList posted standards for coding and commenting? I mean, how many tabs to indent for code and comments, what to capitalize, etc. > You have another issue to think about. It's very likely that if you are > using a port pin to drive the cathode, that the display will be too dim to > be useful. You're definitely right about this. I prefer using a transistor for each display. It helps me to keep all the work in the PIC instead of depending on logic in another chip, but either method would work. Have far along are you on segment multiplexing? That would solve the power problem for my situation, but I expect it would require quite a bit more code. Thanks! -Pat -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body