??? 08/11/05 19:36 Read: times |
#99214 - Created a program! Responding to: ???'s previous message |
I have made this program so far, with the serial and timer/counter configurations on. Unfortunately it doesn't seem to work.
ORG 0800 SJMP START ORG 800H START: MOV SCON,#00010000B ;MODE 0, RECEIVE ENABLE (REN) MOV PCON,#0 ;set SMOD to 0, no doubling of baud rate mov TMOD, #01100000B ;counter 1, mode 2, C/T=1 MOV TH1,#0FDH ;hex FD into timer high byte to define 9600 baud rate mov TH0, #0 ;count from 0x00 to 0xFF setb P3.4 ;configure P3.4 as input AGAIN: setb TR0 ;enable counter BACK: mov A, TL0 ;read TL0 value mov SBUF, A ;display it on P2 jnb TF0, back ;poll for TF0, clr TR0 ;stop counter clr TF0 ;clear TF0 flag sjmp AGAIN ;while(1) Can anyone see where I am going wrong, please help! |
Topic | Author | Date |
using the COUNTER with the SERIAL | 01/01/70 00:00 | |
I think your problem is that you are usi | 01/01/70 00:00 | |
chip being used | 01/01/70 00:00 | |
give a link | 01/01/70 00:00 | |
wahts about the direction ? | 01/01/70 00:00 | |
To Peter | 01/01/70 00:00 | |
Change chip. | 01/01/70 00:00 | |
Nope! I can't do that | 01/01/70 00:00 | |
I do not know if micro can, but it would | 01/01/70 00:00 | |
sorry | 01/01/70 00:00 | |
How do you propose to (re)program this c | 01/01/70 00:00 | |
use external interrupts | 01/01/70 00:00 | |
DEEPEST APOLOGIES!!! | 01/01/70 00:00 | |
Re DS5000 | 01/01/70 00:00 | |
ds5000 | 01/01/70 00:00 | |
Created a program! | 01/01/70 00:00 | |
read up on UART modes in "the bible" | 01/01/70 00:00 | |
A new idea! maybe the right one | 01/01/70 00:00 | |
you are running out of timers | 01/01/70 00:00 | |
using the COUNTER with the SERIAL port | 01/01/70 00:00 | |
timer2 | 01/01/70 00:00 | |
No timer 2 | 01/01/70 00:00 | |
Your problem is that you need 3 counter/ | 01/01/70 00:00 | |
erik | 01/01/70 00:00 | |
I think you have run into a mental block![]() | 01/01/70 00:00 |