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 a wg12864a

Status
Not open for further replies.

jkissl

Newbie level 5
Joined
Feb 19, 2010
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Texas
Activity points
1,344
I have a pic16f877a micro controller and a wg12864a display. I have gone through data sheets and tutorials and many schematics trying to get it to work. I can’t get the screen to display the simple “hello world”. I know the code and how to program, but what I can’t seem to get to work is the screen. any help would be welcome. Thanks in advance!!
 

I am pretty sure it is C code; I am very new to programming, but I know the just of it. Here is a segment of the code:

#include "mxapi.h"
void main(void)
{
lcd_init(); //Initialize the LCD
lcd_instruction(CLEAR); //Clear the LCD
lcd_text("Hello World; hi !"); //Send text to the LCD
TRISB6 = OUTPUT; //Set up Port B0 as an output
TRISB5 = INPUT; //Set up Port B2 as an input
while(1==1) //Set up a while loop
{
if (RB5 == HIGH) //If the button is pressed
{
RB6 = HIGH; //Turn on the LED
delay_ms(1000);
}
else //If the button is not pressed
{
RB6 = LOW; //Turn off the LED
}
}
}
 

hi,

Sorry cannot help there - only do assembler - try searching '12864 in C ' in this forum and also the Electro Tech forum - sure you will find some examples around.
 

I am looking for a schematic and a code example, I can go from there. I have been searching Google and other forums for a few hours and trying different combinations of wiring. Any help would be much appreciated, thanks a bunch!
 

Hi,

Have attatched some files that may be of help, basically its from my assembler program for the more modern spi glcds that a friend has modifed to run the 12864 glcd on his Mikroe dev board.

The .dsn / .jpeg files show the circuit, but when used with the .hex file it will actually run as a live demo.
If you do not know how to do that let me know and I will send you details of how to do it.

As for the main assembler coding - its 1500 lines long and not easy to follow.

What little I know about C , you are using Cs glcd library I think, but not sure if you still need to define the i/o ports and importantly, specify the initialisation routine.
I have sent the assember init routinue which I think you can follow and convert if necessary.
 

Thank you very much for the schematic and the code examples. I have assembled the board according to the schematic. The one remaining issue is that the Compiler that I have been using for programming is on line, and does not use those file types. What program/compiler would I use or you recommend, using with these files?
 

Hi,

Well am bit lost as to what you are compling with - did not know you could 'cloud' compile in C .. ?

The bit of Initialisation code I sent was in Microchip Assembler and intended as a guide line for you to code those paramenters into your C code if needed.

There are many compliers and development tools out there but the most common probably is Microchips own MPLAB IDE which comes with Assembler and you can also download various free C compliers.
 
Perhaps I don’t know as much as I thought… Any way it is in fact cloud coding. Here is the website www.machinescience.com. Thank you for the suggestions I will look them up!
 
Hi,

Sorry I fogot to include the download link for microchips stuff

**broken link removed**

Had a look at that site, all very interesting and as you say it is done in the cloud.

Assume you just have to buy the hardware, either their bootloaded pic16f877 and / or the little usb programmer.
It certainly looks as though they have made it as easy as possible to get going with all those well documented projects etc - it looks very good in that sense.
Think even I could follow those C examples !

Although as I said I really know nothing of C I think I can now see where your problem is.

In the example you show you are calling up the lcd routine from their C library - but it is for just that a 2 x 16 , 2 rows of 16 characters display that accepts standard ascii character codes.

You are trying to use a glcd 128x64 pixels that needs data sending to it in pixel format, ie a load on or off pixels.

Unless that Complier has an inbuilt glcd 128x64 ks0108 library then the only way you can get it to work is to code in every single instructiion your self - not realistic.

Think you should ask around in their forum if anyone else has found or made a glcd module.
Would aslo be interesting to know which family of C it belongs to - in the sense that if it is compatible with say Microchips C you might be able to get things from there - but only guessing on that.
 

Don’t worry I found the program that you had mentioned.
With the Machine Science kit you get the PIC and the programmer I had been trying to see if it would work with MPLAB IDE, but I doubt it will.
I am working on and alarm clock that will have many functions; the functions themselves will be relatively easy to code. Right now the hardest part is getting the screen. At some point I will have to upgrade to a different PIC, I am looking at one of those PIC32s.
Anyway, thank you very much for your help, I will continue to come through forums and data sheets till I get this up and going.
 

Hello,

can anybody give me the orcad schematic and footprint for PIC16f877?

Hoping a soon reply

Thankx
 

Look at a datasheet, just google it: PIC16f877
 

Hi,
I have already gone through the datasheet.

What i need is the orcad model and orcad footprint of PIC16f77.

It is not mentioned given in the datasheet.

I have already googled bt could not find it. Hoped some one in this group may have that and really help me and posted.


jkissl said:
Look at a datasheet, just google it: PIC16f877[/quote[/b]
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top