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.
Programming failed error when using certain libraries in MikroC PRO
Hello all. I am experiencing a very strange problem when attempting to program my PIC18f8722. I am using the MikroC PRO compiler.
The problem is that whenever I try to use the 'FloatToStr' function and then program device I...
Ok so I changed a few parts and tried it out this morning and the code was sucessful!
Heres the final code for anyone that is interested:
// Port Expander module connections
sbit SPExpanderRST at RF6_bit;
sbit SPExpanderCS at RA2_bit;
sbit SPExpanderRST_Direction at TRISF6_bit;
sbit...
I will give this a shot right now!
---------- Post added at 23:28 ---------- Previous post was at 23:10 ----------
Are the routines InitSPI, InitPortB_SPI and InitPortA_SPI actually required when using mikroC? I'd say the Expander_Init() and SPI1_Init() covers this.
The following code will write to the expanders port B:
// Port Expander module connections
sbit SPExpanderRST at RF6_bit;
sbit SPExpanderCS at RA2_bit;
sbit SPExpanderRST_Direction at TRISF6_bit;
sbit SPExpanderCS_Direction at TRISA2_bit;
// End Port Expander module connections
void...
The expander has a port A which has the E and RS signals and port B which has the 8 data bits. It's unclear to me which port is being written to in the ASM routine. For the test patterns I simply wrote to port B and checked if the pins on the LCD were the same.
Thank you for finding all this! Unfortunately I don't really understand the ASM routine, I cannot tell which port of the expander is being written too. I'm pretty out of my depth here...
I tried this exact thing earlier to verify if the port expander library was working and the LCD pins had the correct pattern on them. So i guess the problem is soley with the SPI_LCD8 library.
Tahmid, the display is a LCM-S01602 DTR/m, I cant find anywhere that says whether it is compatible.
BigDog, thanks for the idea; I added the delay but still nothing on the screen.
Hi, I can successfully program the port expander on its own so I think the problem is with the SPI_Lcd8_Config() command. I am wondering if this LCD display is controllable via this library?
RST is connected to RF6 and CS to RA2 so that part is ok.
There is no pot on this demo board to adjust contrast and the configuration bits are set in the code.
What do you mean by the necessary changes in the hardware?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.