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 CCS Technical Support

GLCD (ks0108) 128x64 - Image (bitmap) - Create? (help-me)

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



Joined: 14 Oct 2007
Posts: 3

View user's profile Send private message

GLCD (ks0108) 128x64 - Image (bitmap) - Create? (help-me)
PostPosted: Sun Oct 14, 2007 12:24 pm     Reply with quote

I looked at the site and did not find anything concrete on GLCD and image. So I decided to write questions to see if you can help me?

CCS compiler version: 4.049

Settings: main.h

Code:

#include <16F877A.h>
#device adc=10

#FUSES NOWDT              //No Watch Dog Timer
#FUSES LP                      //Low power osc < 200 khz
#FUSES NOPUT               //No Power Up Timer
#FUSES NOPROTECT       //Code not protected from reading
#FUSES NODEBUG          //No Debug mode for ICD
#FUSES NOBROWNOUT   //No brownout reset
#FUSES NOLVP               //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD              //No EE protection
#FUSES WRT_50%          //Lower half of Program Memory is Write Protected

#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)


Settings: main.c
Code:

#include "main.h"
#include <GLCD.c>
#include <math.h>

//Variables of the main program
 int16  lm35i, MPX5700i;
 float lm35f,  MPX5700f;
 char  TempText[] = "Temperatura: ";
 char  PressaoText[] = "Pressao...:: ";
 char  conversao[20];
//-------------------------------------------


void main()
{
   setup_adc_ports(AN0_AN1_VSS_VREF);
   setup_adc(ADC_CLOCK_INTERNAL);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_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);

   // Begin CODE!
   glcd_init(ON);                             
   delay_ms(1);
   glcd_fillScreen(OFF);
   glcd_rect(1, 5, 126, 62, NO, ON);
   glcd_text57(3, 8, TempText, 1, ON);
   glcd_text57(3, 16, PressaoText, 1, ON);
   
  do
  {
      // begin code - LM35 ---------------------------------------------
      set_adc_channel(0);                      //Arrow reading in the channel AN0
      delay_ms(1);
      lm35i= read_adc();                     
      delay_ms(1);
     
      //Conversion
      lm35f= (lm35i*0.0048828125*100);
      delay_ms(1);
      sprintf(conversao,"%f", (float)lm35f);
      glcd_text57(80, 8, conversao, 1, ON);
      glcd_text57(80, 8, conversao, 1, OFF);
      //end code - LM35 ----------------------------------------------
         

      //begin CODE - MPX5700A --------------------------------------------------
      set_adc_channel(1);                     //Arrow reading in the channel AN1
      delay_ms(1);                           
      MPX5700i= read_adc();             
      delay_ms(1);
     
      //Conversion
      MPX5700f= (22.281*(MPX5700i*0.004882))+9.0869;
      delay_ms(1);
      sprintf(conversao,"%f", (float)MPX5700f);
      glcd_text57(80, 16, conversao, 1, ON);
      glcd_text57(80, 16, conversao, 1, OFF);
      //end CODE - MPX5700A ----------------------------------------------------

     
  }while(1);
 
}


The code in my application is posted before, now I need help putting a background image?

Thanks! (Forgiveness by my English, I am Brazilian!)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Oct 14, 2007 12:36 pm     Reply with quote

Quote:
#FUSES LP // Low power osc < 200 khz

#use delay(clock=4000000)


For a 4 MHz crystal, you should use the XT fuse.
eduardoludgero



Joined: 14 Oct 2007
Posts: 3

View user's profile Send private message

Need Files (posted)
PostPosted: Tue Oct 16, 2007 9:33 am     Reply with quote

Need files:

* Imagemakerv2.rar
* Glcdanim.rar
* Animation.avi

Sending me by e-mail. PLEASE!

Files in post: www.ccsinfo.com/forum/viewtopic.php?t=27615&highlight=glcd + animation

Thanks!
Mail: [email protected]
dda
Guest







Re: Need Files (posted)
PostPosted: Sat Jan 02, 2010 11:45 pm     Reply with quote

eduardoludgero wrote:
Need files:

* Imagemakerv2.rar
* Glcdanim.rar
* Animation.avi

Sending me by e-mail. PLEASE!

Files in post:
Thanks!
Mail: [email protected]



all links in the above link are dead, could you please post another link or could you please share the files.
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