Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16f877a with Nokia 5110 Display in assembly

Status
Not open for further replies.

kgavionics

Full Member level 3
Full Member level 3
Joined
Jun 12, 2012
Messages
167
Helped
7
Reputation
14
Reaction score
11
Trophy points
1,298
Location
Alberta.Canada
Visit site
Activity points
2,482
HI
i have a nokia 5510 LCD display and i'm wondering if some one have try to use it with assembly,because the only tutorial i find on internet are written with C.

can someone tell me how can i do to initialize the display and write a simple string on it.


thanks in advance
 

Hi there,


Please check LCD communication is either serial or parallel ?

Best regards,
 


Interfacing Nokia 3510i and 5110 LCD with PIC Microcontroller
**broken link removed**

PIC and 5110 Interface with SPI hardware – PR3
**broken link removed**


Nokia 5110 LCD
pinout_5110.jpg




Best regards,
Peter
 
Thanks peter for the link,unfortunately the programming language its not assembly.I'm trying to do a function to write a pixel to the Lcd.i know assembler is not very used often,but i like assembler because with it i can understand every aspect of hardware.with C language it's efficient with the pic18 and up,but with pic16 and down, better use of assembler.
 

Controlling a nokia5110 lcd with software SPI on a pic16f84a
https://diytronics.blogspot.com/2011/05/controlling-nokia5110-lcd-with-software.html

Code:
Start    BSF  03h,5         ;switch from bank 0 to 1

    MOVLW  b'00000000' ;Out RB to output
    MOVWF 06h
    MOVLW  b'00000'       ;Out RA to output
    MOVWF 05h

    BCF 03h,5          ;switch from bank 1 to 0     
;RB0=sclk
;RB1=sda
;RB2=D_C
;RB3=Sce
;RB4=reset
;RB5=disp pwr
Begin
    bsf 06h,3 ;disable serial
    bsf 06h,5 ;power on display
    nop
    bcf 06h,4 ;reset
    nop
    bsf 06h,4 ;release from reset

; sel extended instruction set (h=1)
    movlw b'00100001'
    movwf 0Ch
    call spi_command

; set Vop (Contrast)
    movlw b'10111001'
    movwf 0Ch
    call spi_command

; sel normal instruction set (h=0)
    movlw b'00100000'
    movwf 0Ch
    call spi_command

; display normal mode
    movlw b'00001100'
    movwf 0Ch
    call spi_command

;---------------------------

; draw H
    movlw b'01111111'
    movwf 0Ch
    call spi_data
    movlw b'00001000'
    movwf 0Ch
    call spi_data
    movlw b'00001000'
    movwf 0Ch
    call spi_data
    movlw b'00001000'
    movwf 0Ch
    call spi_data
    movlw b'01111111'
    movwf 0Ch
    call spi_data

call _space

; draw e
    movlw b'00001110'
    movwf 0Ch
    call spi_data
    movlw b'00010101'
    movwf 0Ch
    call spi_data
    movlw b'00010101'
    movwf 0Ch
    call spi_data
    movlw b'00010101'
    movwf 0Ch
    call spi_data
    movlw b'00001100'
    movwf 0Ch
    call spi_data

call _space

; draw l
    movlw b'00000000'
    movwf 0Ch
    call spi_data
    movlw b'01000001'
    movwf 0Ch
    call spi_data
    movlw b'01111111'
    movwf 0Ch
    call spi_data
    movlw b'00000001'
    movwf 0Ch
    call spi_data
    movlw b'00000000'
    movwf 0Ch
    call spi_data

call _space

; draw l
    movlw b'00000000'
    movwf 0Ch
    call spi_data
    movlw b'01000001'
    movwf 0Ch
    call spi_data
    movlw b'01111111'
    movwf 0Ch
    call spi_data
    movlw b'00000001'
    movwf 0Ch
    call spi_data
    movlw b'00000000'
    movwf 0Ch
    call spi_data

call _space

; draw o
    movlw b'00001110'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00001110'
    movwf 0Ch
    call spi_data

call _space

; goto y=1,x=0
    movlw b'00000001'
    movwf 0Ch
    movlw b'00000000'
    movwf 0Dh
    call setxy

; draw W
    movlw b'01111110'
    movwf 0Ch
    call spi_data
    movlw b'00000001'
    movwf 0Ch
    call spi_data
    movlw b'00001110'
    movwf 0Ch
    call spi_data
    movlw b'00000001'
    movwf 0Ch
    call spi_data
    movlw b'01111110'
    movwf 0Ch
    call spi_data

call _space

; draw o
    movlw b'00001110'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00001110'
    movwf 0Ch
    call spi_data

call _space

; draw r
    movlw b'00011111'
    movwf 0Ch
    call spi_data
    movlw b'00001000'
    movwf 0Ch
    call spi_data
    movlw b'00010000'
    movwf 0Ch
    call spi_data
    movlw b'00010000'
    movwf 0Ch
    call spi_data
    movlw b'00001000'
    movwf 0Ch
    call spi_data

call _space

; draw l
    movlw b'00000000'
    movwf 0Ch
    call spi_data
    movlw b'01000001'
    movwf 0Ch
    call spi_data
    movlw b'01111111'
    movwf 0Ch
    call spi_data
    movlw b'00000001'
    movwf 0Ch
    call spi_data
    movlw b'00000000'
    movwf 0Ch
    call spi_data

call _space

; draw d
    movlw b'00001110'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00010001'
    movwf 0Ch
    call spi_data
    movlw b'00001001'
    movwf 0Ch
    call spi_data
    movlw b'01111111'
    movwf 0Ch
    call spi_data

call _space

; draw !
    movlw b'01111101'
    movwf 0Ch
    call spi_data

;---------------------------
; goto y=5,x=0
    movlw b'00000101'
    movwf 0Ch
    movlw b'00000000'
    movwf 0Dh
    call setxy
;draw image block 4
    movlw b'10000111';1
    movwf 0Ch
    call spi_data
    movlw b'11111101';2
    movwf 0Ch
    call spi_data
    movlw b'10000001';3
    movwf 0Ch
    call spi_data
    movlw b'01100001';4
    movwf 0Ch
    call spi_data
    movlw b'00010001';5
    movwf 0Ch
    call spi_data
    movlw b'11001001';6
    movwf 0Ch
    call spi_data
    movlw b'00100101';7
    movwf 0Ch
    call spi_data
    movlw b'00100101';8
    movwf 0Ch
    call spi_data
    movlw b'11100001';9
    movwf 0Ch
    call spi_data
    movlw b'00011001';10
    movwf 0Ch
    call spi_data
    movlw b'00000101';11
    movwf 0Ch
    call spi_data
    movlw b'00000011';12
    movwf 0Ch
    call spi_data
    movlw b'00000011';13
    movwf 0Ch
    call spi_data
    movlw b'00000001';14
    movwf 0Ch
    call spi_data
    movlw b'00111001';15
    movwf 0Ch
    call spi_data
    movlw b'11101101';16
    movwf 0Ch
    call spi_data
    movlw b'00000111';17
    movwf 0Ch
    call spi_data

; goto y=4,x=0
    movlw b'00000100'
    movwf 0Ch
    movlw b'00000000'
    movwf 0Dh
    call setxy
;draw image block 3
    movlw b'00000111';1
    movwf 0Ch
    call spi_data
    movlw b'00111100';2
    movwf 0Ch
    call spi_data
    movlw b'01100100';3
    movwf 0Ch
    call spi_data
    movlw b'01010011';4
    movwf 0Ch
    call spi_data
    movlw b'11110000';5
    movwf 0Ch
    call spi_data
    movlw b'00111000';6
    movwf 0Ch
    call spi_data
    movlw b'11111001';7
    movwf 0Ch
    call spi_data
    movlw b'11111011';8
    movwf 0Ch
    call spi_data
    movlw b'10010011';9
    movwf 0Ch
    call spi_data
    movlw b'11110100';10
    movwf 0Ch
    call spi_data
    movlw b'11110100';11
    movwf 0Ch
    call spi_data
    movlw b'01110100';12
    movwf 0Ch
    call spi_data
    movlw b'01110000';13
    movwf 0Ch
    call spi_data
    movlw b'00010000';14
    movwf 0Ch
    call spi_data
    movlw b'00100100';15
    movwf 0Ch
    call spi_data
    movlw b'10011111';16
    movwf 0Ch
    call spi_data
    movlw b'11010000';17
    movwf 0Ch
    call spi_data
    movlw b'01110000';18
    movwf 0Ch
    call spi_data

; goto y=3,x=0
    movlw b'00000011'
    movwf 0Ch
    movlw b'00000000'
    movwf 0Dh
    call setxy
;draw image block 2
    movlw b'00011100';1
    movwf 0Ch
    call spi_data
    movlw b'00010110';2
    movwf 0Ch
    call spi_data
    movlw b'00010010';3
    movwf 0Ch
    call spi_data
    movlw b'00010010';4
    movwf 0Ch
    call spi_data
    movlw b'00010011';5
    movwf 0Ch
    call spi_data
    movlw b'00010001';6
    movwf 0Ch
    call spi_data
    movlw b'00110001';7
    movwf 0Ch
    call spi_data
    movlw b'00100000';8
    movwf 0Ch
    call spi_data
    movlw b'01100000';9
    movwf 0Ch
    call spi_data
    movlw b'01000000';10
    movwf 0Ch
    call spi_data
    movlw b'11000000';11
    movwf 0Ch
    call spi_data
    movlw b'10000000';12
    movwf 0Ch
    call spi_data
    movlw b'00000000';13
    movwf 0Ch
    call spi_data
    movlw b'00000010';14
    movwf 0Ch
    call spi_data
    movlw b'00011111';15
    movwf 0Ch
    call spi_data
    movlw b'01110001';16
    movwf 0Ch
    call spi_data
    movlw b'11000000';17
    movwf 0Ch
    call spi_data

; goto y=2,x=12
    movlw b'00000010'
    movwf 0Ch
    movlw b'00001100'
    movwf 0Dh
    call setxy
;draw image block 1
    movlw b'00000001';12
    movwf 0Ch
    call spi_data
    movlw b'00000001';13
    movwf 0Ch
    call spi_data
    movlw b'00000011';14
    movwf 0Ch
    call spi_data
    movlw b'00000010';15
    movwf 0Ch
    call spi_data
    movlw b'00000010';16
    movwf 0Ch
    call spi_data
    movlw b'00000011';17
    movwf 0Ch
    call spi_data

a goto a

;----------------------------

spi_command
    bcf 06h,3 ;start serial transmission
    bcf 06h,2 ;D_C=0
        btfss 0Ch,7
        goto c1
        call one
        goto c1n
    c1    call zero
    c1n    btfss 0Ch,6
        goto c2
        call one
        goto c2n
    c2    call zero
    c2n    btfss 0Ch,5
        goto c3
        call one
        goto c3n
    c3    call zero
    c3n    btfss 0Ch,4
        goto c4
        call one
        goto c4n
    c4    call zero
    c4n    btfss 0Ch,3
        goto c5
        call one
        goto c5n
    c5    call zero
    c5n    btfss 0Ch,2
        goto c6
        call one
        goto c6n
    c6    call zero
    c6n    btfss 0Ch,1
        goto c7
        call one
        goto c7n
    c7    call zero
    c7n    btfss 0Ch,0
        goto cd
        call one
        goto cdn
    cd    call zero
cdn    bcf 06h,0
    bsf 06h,3 ;end serial transmission
return

spi_data
    bcf 06h,3 ;start serial transmission
    bsf 06h,2 ;D_C=1
        btfss 0Ch,0
        goto b1
        call one
        goto b1n
    b1    call zero
    b1n    btfss 0Ch,1
        goto b2
        call one
        goto b2n
    b2    call zero
    b2n    btfss 0Ch,2
        goto b3
        call one
        goto b3n
    b3    call zero
    b3n    btfss 0Ch,3
        goto b4
        call one
        goto b4n
    b4    call zero
    b4n    btfss 0Ch,4
        goto b5
        call one
        goto b5n
    b5    call zero
    b5n    btfss 0Ch,5
        goto b6
        call one
        goto b6n
    b6    call zero
    b6n    btfss 0Ch,6
        goto b7
        call one
        goto b7n
    b7    call zero
    b7n    btfss 0Ch,7
        goto d
        call one
        goto dn
    d    call zero
dn    bcf 06h,0
    bsf 06h,3 ;end serial transmission
return

zero
    bcf 06h,0
    bcf 06h,1 ;0
    bsf 06h,0 ;sclk pulse
return

one
    bcf 06h,0
    bsf 06h,1 ;1
    bsf 06h,0 ;sclk pulse
return

_space ;send byte='00000000', draw space
    movlw b'00000000'
    movwf 0Ch
    call spi_data
return

setxy
    bsf 0Ch,6
    call spi_command
    bsf 0Dh,7
    movf 0Dh,0
    movwf 0Ch
    call spi_command
return

end



Best regards,
Peter

;-)
 

The 5110 and 3310 displays are quite similar, same controller, resolution, and almost the same pinout.

The following blog includes assembly source for the PIC16F84, which can be easily ported to virtually any PIC16F series, including the PIC16F877A.




Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
; ###### lcd test for nokia 3310 display ######
;               AC 7/8/08
;
; The display is connected as follows:
; RB0   SDI     Data line               
; RB1   SCK     Serial clock- clock data in on rising edge
; RB2   SCE     Serial Clock enable- active low
; RB3   D/C     Data/Command select, high = data; low = command
; RB4   RES     Reset   
 
        ; just a few assembler directives
        list    p=16f84
        include <p16F84.inc>
        __config        _CP_OFF & _PWRTE_OFF & _WDT_OFF & _XT_OSC
 
        
        ;Bank 0 special function file registers
status  equ     0x03            ; Status register.
porta   equ     0x05            ; Port A
portb   equ     0x06            ; Port B
eedata  equ     0x08            ; EEPROM Data register
eeaddr  equ     0x09            ; EEPROM Address register
intcon  equ     0x0b            ; Interrupt control register
 
        ;Bank 0 file registers above 0b for general use
count1  equ     0x0c            ; General Use loop counter
count2  equ     0x0d            ; General Use loop counter
count3  equ     0x0e            ; General Use loop counter      
count4  equ     0x0f            ; loop ctr, used in display clear
count5  equ     0x10            ; as above      
outbyt  equ     0x11            ; byte to send to display
sck     equ     0x12            ; used for serial clocking count
 
        ;bank 1 special function file registers
trisa   equ     0x85            ; Port A direction control
trisb   equ     0x86            ; Port B direction control
eecon1  equ     0x88            ; EEPROM Control register 1
eecon2  equ     0x89            ; EEPROM Control register 2     
                
        org     0x00            ; Set program memory base at reset vector 0x00
 
reset
        goto    start           ; Go to start of the main program
        org     0x04            ; Set program memory base to beginning of user code
 
start
        ; set up the ports with RA 0-3 output, RA4 input
        ; RB0-7 output
        bsf     status, 5       ;go to bank 1
        movlw   0x10            ;send 00010000  
        movwf   trisa           ;to TRISA
        movlw   0x00            ;send 00000000
        movwf   trisb           ;to TRISB
        bcf     status, 5       ;and return to bank 0   
        
        ; Initialise the I/O ports as necessary.
        movlw   0x00
        movwf   porta           ;set port a to zeros
        movlw   0x1C            ;set LCD lines on port b as follows:
                                ;RES high
                                ;D/C high
                                ;SCE high
                                ;SCK low
        movwf   portb           ;SDA low
        
 
main    
        bcf   portb, 4          ;take reset line low
        call  delay1            ;wait 5mS
        bsf   portb, 4          ;and set it high again
        bcf   portb, 3          ;take D/C line low (go to command mode)
        movlw 0x21              ;Activate chip and H=1
        call  dispout   
        movlw 0xC2              ;Set LCD voltage to 7v
        call  dispout
        movlw 0x13              ;Set bias
        call  dispout
        movlw 0x20              ;Set horizontal addressing and H=0
        call  dispout
        movlw 0x09              ;Activate all segments
        call  dispout                   
        bsf   portb, 3          ;set D/C line low
        call  clrdisp           ;clear display RAM
        bcf   portb, 3          ;set D/C line high again
        movlw 0x08              ;Blank display
        call  dispout   
        movlw 0x0C              ;Display normal
        call  dispout   
        bsf   portb, 3          ;set D/C line high
        call  home              ;and goto top left
 
        ;write greeting to display
        movlw 0x7f              ;H
        call dispout            ;
        movlw 0x08              ;
        call dispout            ;
        movlw 0x08              ;       
        call dispout            ;
        movlw 0x08              ;
        call dispout            ;
        movlw 0x7f              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x38              ;e
        call dispout            ;
        movlw 0x54              ;
        call dispout            ;
        movlw 0x54              ;       
        call dispout            ;
        movlw 0x54              ;
        call dispout            ;
        movlw 0x18              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;l
        call dispout            ;
        movlw 0x41              ;
        call dispout            ;
        movlw 0x7f              ;       
        call dispout            ;
        movlw 0x40              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;l
        call dispout            ;
        movlw 0x41              ;
        call dispout            ;
        movlw 0x7f              ;       
        call dispout            ;
        movlw 0x40              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x38              ;o
        call dispout            ;
        movlw 0x44              ;
        call dispout            ;
        movlw 0x44              ;       
        call dispout            ;
        movlw 0x44              ;
        call dispout            ;
        movlw 0x38              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;space
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;       
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x3f              ;W
        call dispout            ;
        movlw 0x40              ;
        call dispout            ;
        movlw 0x38              ;       
        call dispout            ;
        movlw 0x40              ;
        call dispout            ;
        movlw 0x3f              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x38              ;o
        call dispout            ;
        movlw 0x44              ;
        call dispout            ;
        movlw 0x44              ;       
        call dispout            ;
        movlw 0x44              ;
        call dispout            ;
        movlw 0x38              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x7c              ;r
        call dispout            ;
        movlw 0x08              ;
        call dispout            ;
        movlw 0x04              ;       
        call dispout            ;
        movlw 0x04              ;
        call dispout            ;
        movlw 0x08              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;l
        call dispout            ;
        movlw 0x41              ;
        call dispout            ;
        movlw 0x7f              ;       
        call dispout            ;
        movlw 0x40              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x38              ;d
        call dispout            ;
        movlw 0x04              ;
        call dispout            ;
        movlw 0x44              ;       
        call dispout            ;
        movlw 0x48              ;
        call dispout            ;
        movlw 0x7f              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x02              ;?
        call dispout            ;
        movlw 0x01              ;
        call dispout            ;
        movlw 0x51              ;       
        call dispout            ;
        movlw 0x09              ;
        call dispout            ;
        movlw 0x06              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;space
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;       
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
        movlw 0x00              ;
        call dispout            ;
testbars:       
        call delay2
        movlw 0xff      
        call dispout
        
 
        goto  testbars          ;lets do it all again
 
        ;Subroutines start here
 
clrdisp:
        ;clears display by writing 0x00 504 times i.e to all RAM locations
        call home               ;start at top left
        movlw   0x7E
        movwf   count4
        movlw   0x03
        movwf   count5
cdloop: 
        movlw   0x00                    
        call dispout    
        decfsz  count4, 1
        goto    cdloop
        decfsz  count5, 1
        goto    cdloop                  
        return
        
        
home:   
        ;resets addressing to top left
        bcf     portb, 3
        movlw   0x40
        call    dispout
        movlw   0x80
        call    dispout
        bsf     portb, 3
        return
 
dispout:
        bcf     portb, 2        ;take SCE line low
        movwf   outbyt          ;save what's in w to outbyt
        movlw   0x08            ;we're going to clock out 8 bits
        movwf   sck             ;so set up the clock counter
        
ckloop:
        bcf     portb, 0        ;set SDA low for now...
        btfsc   outbyt, 7       ;test bit 7 of outbyt
        bsf     portb, 0        ;set SDA high if bit 7 is high  
        bsf     portb, 1        ;take SCK high
        bcf     portb, 1        ;and low again to clock the bit in      
        rlf     outbyt          ;rotate outbyt left to be ready with next bit
        decfsz  sck, 1          ;all bits sent?
        goto    ckloop          ;no, do next
        bsf     portb, 2        ;yes, take SCE line high 
        return                  ;done.
 
delay2  ; 1 second delay
        movlw   0x8d            ;count however many iterations of delay1
        movwf   count3          ;
dl2lp1                          ;this means delay 2 loop 1
        call delay1             ;
        decfsz  count3,1        ;
        goto    dl2lp1          ;
        return                  ;and then exit
 
delay1  ; 5 mS delay
        movlw   0xff            ;preset the variables to their starting values
        movwf   count1          ;
        movlw   0x09            
        movwf   count2
dl1lp1
        decfsz  count1,1        ;run around this loop 255 times
        goto    dl1lp1          ;
        decfsz  count2,1
        goto    dl1lp1
        return                  ;exit on completion
 
        
        
 
        
        
        
        end



I would also add that although the 5110 display is often advertised as 5v tolerant or even can be operated at 5v, doing so will drastically short the lifespan of the unit which was design to operate at 2.7v to 3.3v range.


BigDog
 

hi guys
i have studied how spi protocol works, and i did a liltle project
https://www.edaboard.com/threads/293925/#post1256894
now to talk with the LCD i have a little question: In pic16f877a datasheet they say that the slave must send data and the master must check the sent data to continue sending the new data.
with the NOKIA LCD i don,t have the SDO output to tie it to the pic, so how can i do to solve this problem?

thanks in advance
 

If the slave does not have SDO it means it can only read in data and not send data. You only have to send data to the device. Post a datasheet of the device or the driver chip used in the display. Looking at the timing diagram it can be said how to send data to the device.
 
If the slave does not have SDO it means it can only read in data and not send data. You only have to send data to the device. Post a datasheet of the device or the driver chip used in the display. Looking at the timing diagram it can be said how to send data to the device.

that's what i thought, i was a little bit confused with microchip datasheet,because they said even though you don't need the data sent by the slave you must read them and throw them away.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top