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/08 04:10
Read: times


 
#158721 - header file
Responding to: ???'s previous message
#ifndef __LCD__
#define __LCD__
#include <REGX52.H>
#define lcd_port P3 // this is where i am having a problem


//LCD Registers addresses
#define EN 0x80
#define RS 0x20

//LCD Commands
#define LCD_CLS 0x01
#define LCD_HOME 0x02
#define LCD_SETMODE 0x04
#define LCD_SETVISIBLE 0x08
#define LCD_SHIFT 0x10
#define LCD_SETFUNCTION 0x28
#define LCD_SETCGADDR 0x40
#define LCD_SETDDADDR 0x80

#define FALSE 0
#define TRUE 1


/******************************
***** FUNCTION PROTOTYPES *****
******************************/
void lcd_init();
void lcd_reset();
void lcd_cmd (char);
void lcd_data(unsigned char);
void lcd_str (unsigned char*);
#endif

List of 29 messages in thread
TopicAuthorDate
lcd port switching problem            01/01/70 00:00      
   P0 does not have internal pull-ups            01/01/70 00:00      
   P1 or P2 should work similarly            01/01/70 00:00      
   i do know that about P0            01/01/70 00:00      
      But how about the control defs            01/01/70 00:00      
         yes i have moved them as well            01/01/70 00:00      
         here is the lcd part of the code            01/01/70 00:00      
            correct me if i am wrong            01/01/70 00:00      
               Tried everything?            01/01/70 00:00      
      Again, I guess you are mixing            01/01/70 00:00      
         could you please poin it out in the code            01/01/70 00:00      
   header file            01/01/70 00:00      
      the above show NOTHING, but here is a guess            01/01/70 00:00      
   hardware problem?            01/01/70 00:00      
      errors not consistent            01/01/70 00:00      
         I am somewhat puzzeled...            01/01/70 00:00      
            come conufusion with the file            01/01/70 00:00      
               My suggestion was to...            01/01/70 00:00      
                  will try that michael            01/01/70 00:00      
         Multimeter is enough            01/01/70 00:00      
            will try that out            01/01/70 00:00      
               Tests both sw and hw            01/01/70 00:00      
   lcd simulator (from keil)            01/01/70 00:00      
      i do not know your chip ...            01/01/70 00:00      
         keep in reset as in ?            01/01/70 00:00      
            if open collector supervisor and reset low            01/01/70 00:00      
   the lcd worked on P0 with pull ups            01/01/70 00:00      
      which processor?            01/01/70 00:00      
         AT89C52            01/01/70 00:00      

Back to Subject List