??? 11/23/04 14:43 Read: times |
#81765 - NAND Gate and Data Table Responding to: ???'s previous message |
Thanks for the info. You folks have been a big help. Now I'm stuck with the table. here is what I have so far.....
;************** ;this section is for initializing stuff – there will be more here later ;************** ; get timer ready so this doesn’t take time later clr tr0 ;make sure timer 0 is stopped clr tf0 ;clear the overflow flag anl tmod, #0xF0 ;clear TR0 and TF0 orl tmod, #0x01 ;set to mode 1 mov tl0, #0 mov th0, #0 ;clear the timer value mov r3, #0 mov r2, #0 ;clear the overflow count ;************** ;turn on int0 ;************** setb ex0 ;enable external 0 interrupt setb ea ;global interrupt enable ;************** ;the code for interrupt 0 ;this needs to be run from 0003h ;*************** setb tr0 ;start the timer clr ex0 ;disable external 0 interrupt setb ex1 ;enable external 1 interrupt reti ;**************** ;the code for interrupt 1 ;this needs to be run from 0013h ;**************** clr tr0 ;stop the timer clr ex1 ;disable external 1 interrupt ??????? ;here’s where I’m stuck ??????? ;I need to read the timer value, and store it in the FIFO table setb ex0 ;enable external 0 interrupt reti ******************* You can see where I’m stuck. My guess is that in the initialization section, I need to create the table. I would greatly appreciate it if you could give me an example or 2 on implementing an FIFO table. All I need to do is push new data in (the timer0 value) and throw out the old data and calculate the average each time. Thanks in advance for your help. Chris Seeley |
Topic | Author | Date |
Event Timer (2 seperate events) | 01/01/70 00:00 | |
Event Timer | 01/01/70 00:00 | |
Event Timer , and a PCA | 01/01/70 00:00 | |
A question | 01/01/70 00:00 | |
NAND Gate | 01/01/70 00:00 | |
Nand gate | 01/01/70 00:00 | |
NAND Gate and Data Table | 01/01/70 00:00 | |
Code | 01/01/70 00:00 | |
Further to Nand gate | 01/01/70 00:00 | |
Event Timer (2 seperate events)![]() | 01/01/70 00:00 |