Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Connecting an LCD with 16F628A

Status
Not open for further replies.
If i add that line before the "endc" i get 3 errors.. if i add it after endc i get none! i hope i did it right.
 
whiz115 said:
ok!!! :)

i added this line "count4 equ 10" over the cblock 0x20 opcode and the error went away! :D

Like Bill said, that's completely the wrong thing to do - and won't work - add it to cblock.

nigel dfo you think i can use the internal oscillator for what i'm trying to do?

I'm not very clear what you're trying to do?, but the internal oscillator is fine for the vast majority of things - all my tutorials use it.
 
Nigel Goodwin said:
I'm not very clear what you're trying to do?, but the internal oscillator is fine for the vast majority of things - all my tutorials use it.

i'm trying to build the circuit with the minimum of components...
if the internal oscillator is fine why i should use an external 4 Mhz?

the opcode that generates this kind of messages:

Message[305] C:\MPASM\LCD.ASM 137 : Using default destination of 1 (file).

is this one "decfsz" ... what is the correct syntax?
 
blueroomelectronics said:
Before doing fancy LCD stuff you should spend some time learning MPASM

that's what i'm doing.. i'm learning and you're helping me. :) and i'm not trying to do fancy lcd stuff... i'm just trying to print some letters on the lcd which also helps me learn something.



About this error "Message[305] C:\MPASM\LCD.ASM 137 : Using default destination of 1 (file)"

which has to do with these opcodes:

Code:
decfsz  count1
decfsz  count2
decfsz  count3
decfsz  count4

what do i have to do?
i guess we try to decrease the counters... but how much?

is this correct so the compiler stops giviving the above message?

Code:
decfsz  count1, 1
decfsz  count2, 1
decfsz  count3, 1
decfsz  count4, 1
 
whiz115 said:
is this correct so the compiler stops giviving the above message?

Code:
decfsz  count1, 1
decfsz  count2, 1
decfsz  count3, 1
decfsz  count4, 1
That's technically correct, but to be clearer for you (not for the assembler) use W or F instead of 1 or 0. If you put W, the result is placed in the W register. If you put F, the result is placed in the countX register. The equates for W and F are in the "p16F628A.inc" include file.
 
futz said:
That's technically correct, but to be clearer for you (not for the assembler) use W or F instead of 1 or 0. If you put W, the result is placed in the W register. If you put F, the result is placed in the countX register. The equates for W and F are in the "p16F628A.inc" include file.

I tried MPLAB (first time in my life :D ) and looks like the code it is executed just fine, the counters look like they are working (decreasing) so i'm not going to change anything else... i guess we can ignore the rest of the messages...

I'm very new to these things with microcontrollers (2-3 weeks) so i'm sorry if i made you guys tired... :)
 
blueroomelectronics said:
You can supress warnings when you are familiar with MPASM. It won't assemble if there are any errors.

there are no errors any more...

About the warnings i'm still getting... Nigel_Goodwin stated that the code uses an instruction that hasn't been recommended for more than ten years but it can still work

so that's not important right now... the important for me is to manage
to initialize the nokia lcd using that code.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top