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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/20/02 16:42
Read: times


 
#23172 - bug with 8252 and keil 6.23 or what ?
Hi
I used the parity macro
#define PARITY(X) (ACC = X, P)
When i use the macro in my program :
ES = 0;// Disable interrupts
TB8 = ~ PARITY('M');
SBUF = 'M';
it gives me 'Z' on the hyper terminal at 19200 BPS and odd parity instead of 'M'.

in remedy to the situation I had to stop using the macro and do it like this:
ES = 0;// Disable interrupts
ACC = 'M';
TB8 = ~P;
SBUF = 'M';
then i get the hyper terminal working displaying M all over the place.
Explanation : i dont know. Somehow the value of ACC changes between the time I called the macro and the time P has been used.
When i disconnect and connect hyper terminal few times then everything stop working and hyper terminal displays unable to open comportx check your settings.
Any suggestions plz ?

List of 6 messages in thread
TopicAuthorDate
bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      

Back to Subject List