CCS also has in-built routines for USB thats why i want to use it..
But i feels that it is not a good compiler..
#ifndef ADD_H_GUARD
#define ADD_H_GUARD
int add(int a, int b);
#endif
I am going back to Hi-Tech C and MikroC
and will find a way to use my MikroC code with my Development Board
By the way, Hi-Tech is now owned by Microchip.
If the bootloader is the issue, you can replace it with one of several available bootloaders.
Although, you most likely can use the bootloader already installed in the dev board, you just need to configure the compiler correctly to generate the correct type of code, Absolute or Relocatable, and if Absolute specify the correct starting address.
Here is very simple LCD working code . Just set pins according to your diagram in file lcd.c
#include <16f877a.h>
#use delay(clock=4000000)
#include <LCD.C>
void main()
{
lcd_init ();
printf (lcd_putc,"%s","LCD TEST");
}
hi guyz... new to this forum...
@arunsharma0731 , After following these threads and suggestions i found a modified lcd driver for ccs compiler with a test code to verify it from ccs forum. hope this may help..
Attached Files Attached Files
File Type: zip lcd.zip (59.2 KB)
#include<16f877a.h>
#use delay(clock=20000000)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#include<lcd.c>
#define LCD_ENABLE_PIN PIN_C0 ////
#define LCD_RS_PIN PIN_C1 ////
#define LCD_RW_PIN PIN_C2 ////
#define LCD_DATA4 PIN_D4 ////
#define LCD_DATA5 PIN_D5 ////
#define LCD_DATA6 PIN_D6 ////
#define LCD_DATA7 PIN_D7
void main()
{
set_tris_d(0x00);
set_tris_c(0x00);
lcd_init();
Delay_ms(100);
while(1)
{
lcd_gotoxy(1,1);
Delay_ms(1000);
lcd_putc("\fReady...\n");
}
}
hi guyz... new to this forum...
@arunsharma0731 , After following these threads and suggestions i found a modified lcd driver for ccs compiler with a test code to verify it from ccs forum. hope this may help..
Attached Files Attached Files
File Type: zip lcd.zip (59.2 KB)
#include<16f877a.h>
#use delay(clock=20000000)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#include "flex_lcd.c"
void main()
{
set_tris_d(0x00);
set_tris_c(0x00);
lcd_init();
Delay_ms(100);
while(1)
{
lcd_gotoxy(1,1);
Delay_ms(1000);
lcd_putc("\fReady...\n");
}
}
#define LCD_DB4 PIN_D4
#define LCD_DB5 PIN_D5
#define LCD_DB6 PIN_D6
#define LCD_DB7 PIN_D7
#define LCD_E PIN_C0
#define LCD_RS PIN_C1
#define LCD_RW PIN_C2
#include<16f877a.h>
#use delay(clock=20000000)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#define LCD_ENABLE_PIN PIN_C0
#define LCD_RS_PIN PIN_C1
#define LCD_RW_PIN PIN_C2
#define LCD_DATA4 PIN_D4
#define LCD_DATA5 PIN_D5
#define LCD_DATA6 PIN_D6
#define LCD_DATA7 PIN_D7
[B][I]#include <lcd.c> // Include Here it will work[/I][/B]
void main()
{
set_tris_d(0x00);
set_tris_c(0x00);
lcd_init();
Delay_ms(100);
while(1)
{
lcd_gotoxy(1,1);
Delay_ms(1000);
lcd_putc("\fReady...\n");
}
}
@arunsharma0731, I got the interest to interface lcd with pic using ccs from the thread you started, I tried all your codes and i tried my own codes with the inbuilt lcd driver file but it just did'nt work after surfing through other forums i figured out that many had this same problem with the driver file, and there was a modified driver file available which worked for me and probably for you too.I couldn't figure out what was wrong in the inbuilt driver file (newbie problem).maybe bigdogguru could explain what is actually the problem with the inbuilt driver file
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?