CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

LCD

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
janiga



Joined: 10 Apr 2006
Posts: 22

View user's profile Send private message

LCD
PostPosted: Mon Apr 10, 2006 4:39 pm     Reply with quote

How do I pass a type to the lcd.c function.
I am able to display characters by lcd_putc("\fTest") but if i assign a type it does not work.

Any suggestions?

Thanks!

Code:

#include "C:\Documents and Settings\Pedro\My Documents\Compilertests\NewProcessor\newlcd6.h"
#include <LCD.C>
#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC                    //Internal RC Osc
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOCPD                    //No EE protection
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOFCMEN                  //Fail-safe clock monitor disabled
#FUSES NODEBUG                  //No Debug mode for ICD
#use delay(clock=4000000)
char n;

void main()
{
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF);
   setup_spi(FALSE);
   setup_lcd(LCD_DISABLED);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   setup_oscillator(OSC_4MHZ);

lcd_init();
n = 5;

WHILE(TRUE)
{
lcd_putc('\f');   /// Clear display
lcd_putc(n);
delay_ms(1000);
}
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 10, 2006 4:44 pm     Reply with quote

Please don't start a new thread everytime you have an LCD question.
Just add the new question onto one of your existing LCD threads.

See this link for the answer to your current question:
http://www.ccsinfo.com/forum/viewtopic.php?t=19610
janiga



Joined: 10 Apr 2006
Posts: 22

View user's profile Send private message

Thanks Again!
PostPosted: Mon Apr 10, 2006 4:53 pm     Reply with quote

It works fine with the code specified in thread!
Also sorry for the new thread, wont happen again.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group