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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/07/03 06:08
Read: times


 
#42995 - RE: Bit Addresable Port 1 problem...URGENT
Responding to: ???'s previous message
hi;
if i understand your problem correctly then you want to set a bit whose location is to be passed to you via r1.by using a lookup you can convert it into required code as follows:

set_p1_bit:
;p1 bit number from 90h to 97h
mov a,r1
clr c
subb a,#090h
mov dptr,#look_up
movc a,@a+dptr
mov p1,a
ret
look_up:
db 01h,02h,04h,08h,10h,20h,40h,80h

Mind you this destroys all previous contents in P1.you may need to modify the code as per your specific requirements.
Pranav


List of 7 messages in thread
TopicAuthorDate
Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      
   RE: Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      
   RE: Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      
   RE: Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      
   RE: Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      
   RE: Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      
      RE: Bit Addresable Port 1 problem...URGENT            01/01/70 00:00      

Back to Subject List