an1234
Joined: 29 Jan 2013 Posts: 2
|
dsPIC and graphic HDM64GS12 128x64 Display Problem |
Posted: Wed Jan 30, 2013 12:44 am |
|
|
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 |
|