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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/02/02 15:48
Read: times


 
#21338 - RE: max7219 with 8051: random results?
It appears that your REPEAT routine has no exit. You do not show the HOLDON or DELAY routine, I can only assume that those routines are available. Is DELAY 100 milliseconds or microseconds. If 100 milliseconds, why? Also, what is the purpose of push 0 and pop 0? As a habit, I stay away from manipulating the stack while in a subroutine, too much opportunity for things to go wrong. If you need to preserve a register save it to an IRAM location.
Be sure about which bit the LCD driver wants first, MSB or LSB. I'm using a DS1302 clock chip with the same three wire serial link and it specifically states LSB first.
You could simplify your data output code by doing as Steve suggests - shift the required bit into Carry and MOV Carry to your Port pin.
Although your posting doesn't show it, are you using interrupts? Whether you are or not, you should avoid the interrupt vector area ( 03h - 2Fh ) and place a RETI at each of the vector locations to insure that an interrupt does not interfere with your program.

Hal

List of 7 messages in thread
TopicAuthorDate
max7219 with 8051: random results?            01/01/70 00:00      
RE: max7219 with 8051: random results?            01/01/70 00:00      
RE: max7219 with 8051: random results?            01/01/70 00:00      
RE: max7219 with 8051: random results?            01/01/70 00:00      
RE: max7219 with 8051: random results?            01/01/70 00:00      
RE: max7219 with 8051: random results?            01/01/70 00:00      
RE: max7219 with 8051: random results?            01/01/70 00:00      

Back to Subject List