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

dsPIC and graphic HDM64GS12 128x64 Display Problem

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



Joined: 29 Jan 2013
Posts: 2

View user's profile Send private message

dsPIC and graphic HDM64GS12 128x64 Display Problem
PostPosted: Wed Jan 30, 2013 12:44 am     Reply with quote

Hi,

I am using a ds30F4013 PIC with HDM64GS12 128x64 Display with the CCS examples HDM64GS12.c and graphics.c
The Display works fine but in some case the PIC makes a reset and the will program starts new.
The PIC will be reset when I call a graphic function which delete a pixel on the display.
For Example glcd_rect(45, 18, 69, 25, YES, OFF); IF last argument is "Off" the PIC makes the reset.
So I can only set pixel and I can't clear pixel.

I have the same problen when I want to set a single pixel glcd_pixel(10, 10, OFF)

Do you have an ideas?

Display Connector:

DATA is connected to PORT B (0:7) output_b(data);
RB8-RB12 is not connected

GLCD_CS1 PIN_D0 // Chip Selection 1
GLCD_CS2 PIN_D1 // Chip Selection 2
GLCD_DI PIN_D2 // Data or Instruction input
GLCD_RW PIN_D3 // Read/Write
GLCD_E PIN_C13 // Enable
GLCD_RST PIN_C14 // Reset



This is the program:

Code:

#include <30f4013.h>

#FUSES NOWDT, NOPROTECT, NODEBUG, NOBROWNOUT, XT, NOPUT                   
#use delay(clock=20MHz , crystal)

#use rs232(baud=38400, UART1, ERRORS, stream = PC)


#define FAST_GLCD   // Try commenting this out to see the differences
#define LARGE_LCD

#include <HDM64GS12.c>
#include <graphics.c>
#include <math.h>
//#include "STRING.H"


      char BT[15] = "Bluetooth";
      char clear[21];
         char valueOnGlcd[10]="****";

void main() {
   
   long io;
 
   printf("CAN GLCD BoX1\r\n");

   strcpy(clear,"                   *");
 
   printf("CAN GLCD BoX2\r\n");
 
   delay_ms(200);
   
   glcd_init(ON);
     
   printf("GLCD Init Ready\r\n");


   while(1)
   {
     
          io++;
     
      delay_ms(1000);
           
      sprintf(valueOnGlcd, "%lu", io *1250);       // buffer in text unwandel
      glcd_rect(4, 25, 20, 40, YES,OFF);   // Alten Wert Löschen
      glcd_text57(5, 30, valueOnGlcd, 1, ON);      // Neuen Wert schreiben
      lcd_update();

   }
   
}


many thanks for your reply


Last edited by an1234 on Wed Jan 30, 2013 1:17 pm; edited 1 time in total
an1234



Joined: 29 Jan 2013
Posts: 2

View user's profile Send private message

PostPosted: Wed Jan 30, 2013 1:15 pm     Reply with quote

I found the problem.

The reset is caused by Bit_clear(*p,y%8) in HDM64GS12.c
I changed it into *p =& y%8 and it works Fine.
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