| ??? 12/03/01 20:41 Read: times |
#17198 - RE: Please check my program codes |
Wot exactly is the prob?? It didnt work or did it simply give the wrong interval?
Assuming you have all the TCON and TMOD things right, and have not enabled/ affected interrupts, I dont see whats wrong ... but let me cover my ass by saying I havent had a very close look at it either :D If the your intervals are mixed up, let us know the crystal freq. That will be the major deciding factor, assuming all other values in ur prog are kept constant. Wot regs CRCH and CRCL point to anyway? Why are you putting values in T1 and T2 regs in the min loop when you're using the TO timer? Am i wrong in assuming the working of this thing is the same as 8051? :D tip: remove the clr P1.7 instruction from the program and then run it. It won't make a difference since you are using cpl 1.7 anyway. If you get the interval after the change, we will know that it was an interrupt thing Advice: Enable interrupts and use the vector address to handle the count subroutine. While it is one way of doing so, and even if the main loop will have to do nothing between overflow interrupts, it is best you write interrupt-based programs. just for the sake of practice. Whatever your needs, interrupt based programs are THE thing to learn, and I suppose the only way to go in a Real-Time environment. kundi |
| Topic | Author | Date |
| Please check my program codes | 01/01/70 00:00 | |
| RE: Please check my program codes | 01/01/70 00:00 | |
| RE: Please check my program codes | 01/01/70 00:00 | |
| RE: Please check my program codes | 01/01/70 00:00 | |
| RE: Please check my program codes | 01/01/70 00:00 | |
| RE: Please check my program codes- Steve | 01/01/70 00:00 | |
| RE: Please check my program codes- Steve | 01/01/70 00:00 | |
| RE: Please check my program codes- Steve | 01/01/70 00:00 | |
| Ps Check program codes-George & Silviu | 01/01/70 00:00 | |
| RE: Ps Check program codes-George & Silviu | 01/01/70 00:00 | |
| RE: Ps Check program codes-George & Silviu | 01/01/70 00:00 | |
| RE: Ps Check program codes-George & Silviu | 01/01/70 00:00 | |
| RE: Ps Check program codes-George & Silviu | 01/01/70 00:00 | |
| RE: Ps Check program codes-Silviu | 01/01/70 00:00 | |
| RE: Ps Check program codes-Erik | 01/01/70 00:00 | |
RE: Please check my program codes | 01/01/70 00:00 |



