Saturday, 20 April 2013

LCD module sale starting from £0.01

Hi folks

I have a few LCD modules on ebids starting from £0.01.  

  1. LCD modules with 40 characters and 1 line 
  2. LCD modules with 40 characters and 2 lines
  3. LCD modules with 20 characters and 4 lines
  4. LCD modules with 20 characters and 1 lines
  5. LCD modules with 16 characters and 2 lines
Happy bidding.....

Please check out here - http://uk.ebid.net/items/MaverickElecontron

Thursday, 18 April 2013

Press and Peel

I have been making PCB board using Press and Peel for many years now.  They are easy to use and fun.  I highly recommend you to buy Press and Peel from http://uk.ebid.net/for-sale/press-and-peel-100400560.htm


Wednesday, 17 April 2013

Where to buy cheap LCD Modules from?

Hi

If you want to buy LCD modules or other electronic components, I highly recommend you to go
http://uk.ebid.net/perl/main.cgi?words=1390051&category2=14&categoryid=14&categoryonly=on&mo=search&type=user

This link offers electronic components at excellent price.


Tuesday, 7 June 2011

LCD Tutorial 7


Tutorial 7 - Marquee part 2      

This project proves to be more challenging than tutorial 7. Instead of using command_shift, I simply rely on the display address in order to move the letter across the LCD module from right to left. Each letter starts at 0x90 which cannot be seen on the LCD panel (See more information  in tutorial 3). 

Each letter moves backward until it reaches on the 1st character on the 1st line. The second letter will stop at 2nd character of the LCD module, third letter stop at third character. It keeps going until the letter run out. The codes has been hardly changed apart from the character_mode prototype function as it needs to be modified in order to operate as marquee.

// Prototype function 
void character_mode(tByte *s)
{
        tByte string,ADDRESS=0X90;
        tWord x,P;
// Switch character mode on 
// RS=ON
        P=16;

        while(*s != 0x0)
        {

                string=*s;

                for (x=0; x<=P; ++x)
                {
         
       RS=ON;
                table_lookup(string);
                pulse_e();
 
               RS=OFF; 
                RS=ON;
                DATA=0x20;
                pulse_e();
                RS=OFF;

                --ADDRESS;
                display_address(ADDRESS);
                Delay_Loop(5);
            }
                        s++;
                        ADDRESS=0x90;
                        display_address(ADDRESS);

                        --P;

        }
}


LCD Tutorial 6


Tutorial 6 - Marquee part 1      

Another function prototype such as command_shift has specifically added in this tutorial. This prototype function is designed to shift the character either left or right. According to the command set table, the fifth row indicates that 0x18 and 0x17 would be used for shifting left and right respectively.

In the character mode prototype function has been slightly modified as the global variable such as size_G is used to count the maximum character in text. Then the size_G add with the local variable such n=16 because of the number characters in the LCD module. 

Basically the code below just shift the text across the LCD module from right to left. In the 'do' section includes the delay_loop which allow the text stay on the LCD module for few seconds then shift again. When the text disappear from the screen, the 0x01 is executed in order to clear the display screen and repeat the above process again. 

// Global Variable
int size_G;

void main(void)
{
        int n;

       
// Configure LCD module into 2 lines, 8-Bits and 5x7 Pixels
        function_set();

        // Blinking and underline cursor

        display_cursor(0x08);

        while(1)
        {
        // Place character on $00
        display_address(0x80);
        // Enter characters
        character_mode("TEST");
        // Determine the max length of characters
        n=16+size_G;

        // Blinking and underline cursor

        display_cursor(0x0c);

        do
        {
        Delay_Loop(20);
        // Shifting text from right to left
        command_shift(0x18);
        n--;
        }       while(n !=0x00);

        // Clear display
        DATA=0x01;
        pulse_e();
        } 
}

Sunday, 29 May 2011

LCD Tutorial 5

Modified character entry source code


The previous tutorial taught you how to implement the character mode and the code is very simple.  If you have not seen it, please check 'Tutorial Four' out before starting here.  This time, six function prototypes have been developed because it will save your time to use repetitive codes. The additional function prototypes are:

 character_mode   - It allows you to enter character in your LCD
 display_cursor      - Configures the underline, cursor and blink
 display_address   - Displays character within 2x16 character
  function_mode     - Configures number of line, bit and format
  table_lookup        - A table consists of A to Z and and numbers
  stop                       - No operation


Above the first column is the functional prototype which will be used in the code, the description on the 2nd column explains what each functional prototype actually does.  
 
According to the source code below, the function_set has been configured so that the LCD module will use 2 lines, 8 bits and 5x7 format. The first character will display on $00. If you look the fourth line in the command mode table in tutorial, 0x08 would represent that cursor, underline and blink have been disabled. 

The character_mode function prototype automatically display 'HELLO WORLD' and it uses the table_lookup function prototype in order to find the hexadecimal number for each character. You can put different word between (' ') in the character_mode function prototype. Another display_cursor has been configured in order to enable underline, cursor and blink. Finally stop function prototype use 'while' loop which run endless.

 void main()
{
       // Configue LCD module into 2 lines, 8-Bits and 5x7 Pixels
        function_set();

        // Place character on $00
        display_address(0x80);

        // Blinking and underline cursor
        display_cursor(0x08);

        // Enter characters         character_mode(''HELLO WORLD");

        // Blinking and underline cursor
        display_cursor(0x0F);

        // Stop there
        stop();
}



Since there are only 16 character in each line, so it would not show the word with more than 16 letters. In the same source code, it has been devised to display the 17th character in the second line by using the display_cursor(0xC0); function prototype. Check it out in the character_mode function prototype. Here is an example, let apply 'DEOXYRIBONUCLEIC ACID' in the character_mode in the main program. You should see like this: