lang » | eng | rom | user » anonymous | login | register | lost |
logo     logo
logo


Display nokia 3310


- This tutorial was made to show the simple operation of a mobile phone screen nokia 3310 black / white 84 x 48 pixels

- The plate is removed from the phone


- After cutting and soldering wires to terminals reached this variant



Features:
  1. Operating system: Windows
  2. Ide Program: Mplab Ide v8.92
  3. Software: platforma Hi-Tech
  4. Programmer: Pickit 2
  5. micro chip: Pic 16F887
I would like to assume that you have knowledge of how C programming somewhat ... how to write a simple program in c (Hitech programming is C)
A simple program written for Windows would look like this:

test.c (linux, windows compiled on schedule. "codeblocks")

---------------------------------
#include <iostream.h>
int main(){
    cout << "This is the first test \n";
    int a; // This is a comment by the end of the line - I declared a variable of type integer
    cout << "Enter an integer";
    cin >> a;
    cout << "You typed the number " << a ;
}
---------------------------------

In Hitech nu este nevoie de aceasta librarie "iostream.h", acolo trebuie explicat foarte clar tipul de microcontriler folosit, MHz folositi, si modul in care el este folosit, pentru ca modul de functionare al picului descris in headerul (la inceputul programului) va face ca el sa aibe anumite trasaturi specifice in care este abordat

ca exemplu pentru hitech PIC16F887:

__CONFIG (FOSC_HS & WDTE_OFF & PWRTE_OFF & MCLRE_ON & CP_OFF & CPD_OFF &
BOREN_OFF & IESO_OFF & FCMEN_OFF & LVP_OFF & DEBUG_OFF);
#define _XTAL_FREQ 20000000 // 20MHz

I will not describe here what each parameter do, the pdf you can find in MICROCHIP site,

A few things first:
  • LCD is powered 3,3V.In full operation requires about 2,6V ~ 2,8V
  • IC1 voltage regulator 78L05 - or any
  • IC2 - GM66102 voltage regulator dropout(but can be used any regulator 3.3 v)
  • C4 - 10uF ~ 47uF
  • C2, C3 - 100nF
  • C5, C6 - 27nF
  • C1 - 4.7 uF
  • R1, R2, R3, R4 - 330 ohms
  • R variable - 5kohm
  • Oscillator 20MHz
  • PIC16F887
SYou can use any PIC16Fxxx provided you have enough space for the program
Power PIC is in IC1 (5v) but you can also use the option to load all mounting only IC2 (I do not recommend this option for testing for peak can not write on the fly due to supply too low)
There are various editing power that can obtain such supply voltages of 3.3V (IC2)
LCD uses a serial transmission SPI protocol.



Note and important strengths is the notion of bit and byte
A bit can have value 0 or 1
One byte can have values between 0 and 255 (256 values)
Warning - 1 byte = 8 bits



The LCD has 84 bit Horizontal and 48 bit vertical

Information transmission in byte, is as follows:

a vertical line of 8-bit x 84 (horizontal location), and then move to the next row
in total there are six vertical lines

As exemlu first line of the LCD:

LCD enables transmission of these frames from left to right or top to bottom.
What does ace st thing:
It transmits the first frame after the LCD automatically switches to the next (right or down according to how it is set increment to the next) and expects to introduce the new frame
When finish line (column) increment automatically jumps to the next line (or column)

To write characters can use the following technique equivalent LCD-s the characters that use 5x7 bits:
Exemplifying the letter "a":



Writing 6 consecutive frames

The first frame is the space between two characters side by side, the first bit of each
byte (or frame) is the space between two characters one above the other:



On one row screen you can write 14 such characters with spaces between them - turning LCD screen in 6 lines and 14 characters per line
It is ideal to show some parameters on the LCD such as temperature, axes, a watch, value km/h even pictures, etc.

About the program and how the program

The program is made ​​under the platform Hitech
Hitech is an ANSI C programming environment developed by Microchip
Note important data types in programming



Their importance here is because space is limited microcontrollers:
  1. if we use such a variable of type "float" for a value in running the program does not use higher values ​​of "255" it is clear that the variable space allocated will be 24 bits instead of 8 (how is a variable of type char), which means they lose memory locations without good reason
  2. char value containing values ​​from -127 to 128, so if we want to use the type char with more positive values ​​we use genuine "unsigned char" type variable
  3. are mere examples of implementation of the variables
a more detailed description will be a tutorial on programming ide

as transmission protocol: it uses SPI:


DC transmission bit command / RAM
DC = 0, the next byte is a command
DC = 1, the next byte is stored in RAM which then send the screen

SCLK is the clock's display

SDIN frame is transmitted
For DC = 0 it is an order
For DC = 1 it is a frame to the display

Execute active SCE frames (command or writing a frame on the screen)

Demo Movie of this program :



The program contains 3 files:
main.c - chip configuration directives, routines and program loops
nok_3310_func.h - data transport functions
nok_3310_font.h - library of characters

little program can found completely under the name:

nokia_3310_test.zip   

It is only available to "registered users"
Registration on the site is free

Given that the program is purely demonstrative character library is minimal, containing only a few Latin characters, a few signs and Loader

for a complete library of fonts contact office@nos30.ro
library contains the following scripts:
  1. symbolistic
  2. latin alphabet
  3. greek alphabet
  4. herbrew alphabet
  5. math symbols
  6. poker symbols
  7. loader like demo


You can help this website by making a donation




   Some of Feedback !

admin - registered - 22 September 2014 - 20:09:06
Acesta este primul subiect astept feedback-urile dumneavoastra !
 This is the first subject , awaiting feedback !
relu - someone - 18 January 2015 - 11:01:06
pare destul de complicat ce ai facut acolo, dupa ce am citit am inteles cum functioneaza ecranul, multumesc.

        Add Feedback of This Subject !

name:
email: will not show in feedback (private) !
Message: