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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/01/04 12:23
Read: times


 
#78489 - RE: Port 0 as memory mapped i/o
Responding to: ???'s previous message
Did I mean I was looking for something ready to use? I so, I blame it on my poor English.

Anyway,

void lcd_dados(unsigned char pdata dados)
{
1 LCD_RD = 1;
2 LCD_CD = 0;
//3 P0 = dados;
4 LCD_CE = 0;
5 LCD_WR = 0;
6 LCD_WR = 0;
7 LCD_WR = 1;
8 LCD_CE = 1;
//9 P0 = 0xFF;
}

//***Schematic AT89C51***///

Port 0 = D0 ~ D7
LCD_WR =P3^6;
LCD_RD =P3^7;
LCD_CE =P2^5;
LCD_CD =P2^6;
LCD_RST=P2^7;
LCD_FS =P3^5;

Question:

If I make P0 = dados, I reckon the compiler treats Port 0 as an I/0 and not as a memory mapped i/o. Am I right?

How can I deal with it using keil compiler.
I have an assembler code that works fine, however I need to migrate to C.

Regards,





List of 16 messages in thread
TopicAuthorDate
Port 0 as memory mapped i/o            01/01/70 00:00      
   RE: Port 0 as memory mapped i/o            01/01/70 00:00      
      RE: Port 0 as memory mapped i/o            01/01/70 00:00      
         Pointless excercise #1            01/01/70 00:00      
            RE: Pointless excercise #1            01/01/70 00:00      
               RE: Pointless excercise #1            01/01/70 00:00      
         RE: Port 0 as memory mapped i/o            01/01/70 00:00      
         RE: Port 0 as memory mapped i/o            01/01/70 00:00      
   RE: Port 0 as memory mapped i/o            01/01/70 00:00      
      RE: Port 0 as memory mapped i/o            01/01/70 00:00      
         Does the Pepsi generation not use Asm?            01/01/70 00:00      
      RE: Port 0 as memory mapped i/o            01/01/70 00:00      
         RE: Port 0 as memory mapped i/o            01/01/70 00:00      
            RE: Converting assembler to C            01/01/70 00:00      
         RE: Port 0 as memory mapped i/o            01/01/70 00:00      
            RE: Port 0 as memory mapped i/o            01/01/70 00:00      

Back to Subject List