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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/01/02 12:40
Read: times


 
#22351 - RE: passing port pin (to Bert)
Listen guys
to access a port bit in keil you do the following:
sbit GreenLED = P1^0;
sbit RedLED = P0^0;

GreenLED = ON;
RedLED = OFF;

this is simple, the problem is i need to do this in a function call.
Its fine you telling me
function(port,bit,state) but you try it and it wont work because the SFR space is parrallel with the uper 128 bytes of ram and the only way keil can distinguish between the two is by the sfr type.
the second problem is that the function cant take sfr type as arguments so it treats it as part of the upper 128 bytes of ram.
The third problem is I need to make this function reentrant, and i cant pass bit types to reentrant functions. Keil doesnt allow it.
can anyone help plz ?

List of 25 messages in thread
TopicAuthorDate
passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Bert)            01/01/70 00:00      
RE: passing port pin (to Bert)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood) J.            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin to a function            01/01/70 00:00      
RE: passing port pin (to Mahmood)            01/01/70 00:00      

Back to Subject List