![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I copied the entire code on your LCD tutorial just to see if I could get my LCD working. I am using a 16F84A, so I changed the processor name at the top, as well as the include file. I also omitted the two lines that turn the 16F628 comparators off. When I turn it on, the cursor flashes, jumps forward two characters, then jumps 3 characters forward and thats it! No characters, just a cursor. Have you got any suggestions about what I might try? Also, do you have a schematic for the LCD-PIC pin assignments? I couldnt find it on your site. By the way, thank you much for the tutorials and the software. It is very helpful for beginners like me. | |
| |
| | (permalink) | ||
| Quote:
Quote:
| |||
| |
| | (permalink) |
| Yes, that was the one other thing I changed: Your code: LCD_PORT Equ PORTA LCD_TRIS Equ TRISA I changed to: LCD_PORT Equ PORTB LCD_TRIS Equ TRISB Is that all I need to do? Sorry, I somehow missed the hardware page link. I will check the addressed. Thanks for your help | |
| |
| | (permalink) |
| Yes, that was the one other thing I changed: Your code: LCD_PORT Equ PORTA LCD_TRIS Equ TRISA I changed to: LCD_PORT Equ PORTB LCD_TRIS Equ TRISB Is that all I need to do? Sorry, I somehow missed the hardware page link. I will check the addressed. Thanks for your help | |
| |
| | (permalink) |
| This is an example that a student, i'm advising, did. A 16 x2 LCD.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| A question about the start address: does the start address in the code have to be the FIRST address in the GPR or can it be any address in the GPR? i.e. can you store values anywhere in the GPR or do they have to be sequential, starting at the first available? for the PIC16F84 the GPR starts at 0x0C but could I code my first variable like this: MyVar equ 0x0E does it matter where I start? I know logically it makes sense to start the first address, but just curious | |
| |
| | (permalink) |
| Yes, it is modified from your code nigel. But I would like to give it here because my student know a little bit about PIC before he made this. So it may help beginners of 84A. he simplize your code nigel, so it may cause problems, i'm sure.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |
| | (permalink) |
| Actually I ended up using Nigel's code. Its working now and Im playing around with it making changes. The code from Falleafd worked (text was displayed), but there were a bunch of interrupt routines that were causing some weird and unpredictable multi-layered loops. Without the schematic for his interrupt switches, it made Nigels code look much easier. So FYI Nigel, your code works fine on a PIC16f84A, the only changes are: Change the LCD_PORT to PORTB Change LCD_TRIS to TRISB Remove command to turn off comparators Wire it up using your schematic, but substitute RB0 through RB7 for RA0 through RA7. Pretty simple actually, I had a misplaced wire on my breadboard. You probably already know this but I wanted to post for other newbies. Thanks again Nigel and Falleafd! | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
Anyways, it's good that you did your LCD. Thanks for noting it for meeh.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | ||
| |
| | (permalink) |
| Oh sorry Nigel, my student did come to this site and see his code, because I tell him that something went wrong with his code. He said that I posted the wrong code :-). I'd showed him the errors when writing interrupt on change, however, he didn't resend me his new code yet... sorry for my carelessness.
__________________ Falleaf mail@falleaf.net English forums at PIC Vietnam - Vietnamese Electronics forums R&P Trading and Forwarding Co. Ltd. Distributor of Microchip in Vietnam | |
| |