About the author

10 Comments

  1. 1

    Ananda

    I am eagerly waiting for the tutorial “Interrupts in LPC214x” since after GPIO I have started programming on interrupts. Please post it soon, else please reply me with some links which I can go through until you post interrupt article.

    Also is it true that Fast Interrupt requests will work only on those MCUs having speed > 60MHz.

    Thank you.

    Reply
    1. 1.1

      Umang Gajera

      Hi Ananda , I am extremely sorry that missed your comment. Its now like 8 months down the line after your response I saw you comments when I was going through the updates. As for the interrupts tutorials its posted @ http://www.ocfreaks.com/lpc2148-interrupt-tutorial/

      Reply
  2. 2

    Rogerio

    I don’t understand. The CD4050 is a high-to-low level shifter. The CD4050 VIH (HIGH level input voltage) is 3.15V to 4.5V suply. Identical to JHD162A the input VIH is 0.7VCC.

    Thanks.

    Reply
    1. 2.1

      Umang Gajera

      Hi Rogerio :D , If I am not wrong then as per the datasheet we can use CD4050B/HCF4050B as CMOS to TTL convertor which is the way I have used them. The Min value for VIH when Vdd=5V is 3.5V and for VOH when Vdd=5V is 4.95V. But it still works when VIH=3.3V and converts it to 5V(4.95V). For JHD162A the VIH is 0.7*Vdd which is 3.5V when Vdd=5V but then it doesn’t seem to work for me :( , I guess JHD162As which I’ve used are expecting VIH to be a bit more than 3.5V around 3.8V to 4V I guess…

      I may be wrong .. please correct me if I am :)

      The datasheets which I’ve used are reference are :
      1) http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00002641.pdf
      2) http://www.fairchildsemi.com/ds/CD/CD4049UBC.pdf

      -Regards

      Reply
  3. 3

    sethupathy

    sir, tried with 1st lcd coding i got output as p p with some symbol.
    p’ls help me to solve the issues asap.

    Reply
    1. 3.1

      Umang Gajera

      Hi Sethupathy , Which development board are you using ? Are you getting a blinking cursor after initializing the module ? I need some more details from your side to pin down the root cause of error.

      -Regards

      Reply
  4. 4

    Gopi M

    Hai,

    this is the tutorial link of oc freaks lcd 16X2 interface program with ARM lpc2148 , i follow this program …

    Interfacing 16X2 LCD with LPC2148 tutorial : OCFreaks!

    first i followed the oc freaks program for interfacing of lcd 16X2 with ARM lpc2148. i can understand the coding and successfully execute the program in my ARM lpc2148 development board. what the program in oc freak tutorial followed is they using port 1 (RS = P1.16 & EN = P1.17) for control pins and port 0 for data pins( D0 t0 D7 ….. P0.0 to P0.7 respectively ) but what i am trying to implement is i want to configure both data pins and control pin in port one itself( port 0) . i wrote program for that task but what the problem i faced is , the command is clearly executing , i saw the cursor in the LCD display but the letter are displayed like junk values.

    so here i mention what all the pins i used and my program.

    Register Select = P0.10
    Enable = P0.13

    D0 = P0.16
    D1 = P0.17
    D2 = P0.18
    D3 = P0.19
    D4 = P0.20
    D5 = P0.21
    D6 = P0.22
    D7 = P0.23

    #include
    void initLCD(void);
    void enable(void);
    void LCD_WriteChar(char c);
    void LCD_WriteString( char * string);
    void LCD_Cmd(unsigned int cmd);
    void delay(void);
    #define RS (1<<10)
    #define EN (1<<13)
    int main(void)
    {
    initLCD();
    LCD_WriteString("GOPI EINSTEIN");
    }

    void initLCD(void)
    {
    IO0DIR = 0xFFFFFFFF;
    IO0PIN = 0×00;
    delay();
    LCD_Cmd(0×38);
    LCD_Cmd(0x0e);
    LCD_Cmd(0×06);
    LCD_Cmd(0×01);
    LCD_Cmd(0×80);
    }

    void enable(void)
    {
    delay();
    IO0PIN |=EN;
    delay();
    IO0PIN &=~EN;
    delay();
    }

    void LCD_WriteChar(char c)
    {
    IO0PIN |=RS;
    IO0PIN |=(((int)c)<<16);
    enable();
    }

    void LCD_WriteString ( char * string)
    {
    while (* string)
    {
    LCD_WriteChar(* string++);
    }
    }

    void LCD_Cmd(unsigned int cmd)
    {
    IO0PIN =0×0;
    IO0PIN |= (cmd<<16);
    enable();
    }

    void delay(void)
    {
    int i=0;
    for(i=0; i<19999; i++);

    }

    this is the program, what a wrote.

    please clear my doubt……

    Reply
    1. 4.1

      Umang Gajera

      Hi Gopi , the problem seems to be with this line: “IO0PIN |=(((int)c)< <16);"

      Try changing that to this :
      IO0PIN = ( (IO0PIN & 0xFF00FFFF) | ((int) c)<<16 );

      I have explained this in detail in your Query thread in forums @ http://www.ocfreaks.com/forums/f93/problem-program-arm-lpc2148-interfacing-lcd-16×2-3175/#post21988

      Reply
  5. 5

    PRAVEEN

    Actually when i started studying with ARM, i felt that it is too tough .
    But when i undergone your tutorials named as ,
    http://www.ocfreaks.com/lpc2148-gpio-programming-tutorial/
    http://www.ocfreaks.com/interfacing-16×2-lcd-with-lpc2148-tutorial/
    am really feeling good and i understood lot of things ,Thank you very much for your guidance

    Reply
    1. 5.1

      Umang Gajera

      I am really Glad that my tutorials helped you :)

      Reply

Leave a Reply

(c) OCFreaks! 2014.