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

Problem with GLCD.C driver on dsPIC [Solved]

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



Joined: 27 Jan 2019
Posts: 9

View user's profile Send private message

Problem with GLCD.C driver on dsPIC [Solved]
PostPosted: Sun Mar 17, 2019 5:34 pm     Reply with quote

PIC: dsPIC33EP256MU806

So I've been using the glcd.c driver for quite a while and it has been working pretty good. But a problem happened recently, I've always used the E port since it's a 8 pin port unlike the other who are 16 pin (To fit in the data of the GLCD which is 8 bit), but now I need the PWM modules and these are exactly in the E port.

I moved everything out of the port E, now the data goes to the B ports first 8 bits, and as for the other pins I'm using the following.

PIN_C12 // Chip Selection 1
PIN_G2 // Chip Selection 2
PIN_G6 // Data or Instruction input
PIN_G7 // Read/Write
PIN_G8 // Enable
PIN_G3 // Reset

Now the problem is, I had this animation which played perfectly before, but now anything I graph literally shows on only the left half of the screen, the right side only shows like an offset part of the left side. I changed the Driver accordingly to the port I'm using.

Any clues of what this could be? Thanks in advance
samu350



Joined: 27 Jan 2019
Posts: 9

View user's profile Send private message

Re: Problem with GLCD.C driver on dsPIC [Solved]
PostPosted: Sun Mar 17, 2019 5:40 pm     Reply with quote

https://i.gyazo.com/dbf861aadb2aa5e01c192dfaa8c37bd0.png

It seems that this pin G2 right here is not available for me to use, I changed it and it solved the issue, maybe I should read the datasheet before using random pins Smile


Last edited by samu350 on Sun Mar 17, 2019 5:51 pm; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9250
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Mar 17, 2019 5:45 pm     Reply with quote

Without seeing the datasheet for the GLCD or the dsPIC
My first guess is that you haven't disabled some internal peripherals that also use the pins the GLCD is now attached to.
To help debug, I'd use simple text not some fancy animation. The simpler it is the better to confirm data IS going where it's supposed to.
Also confirm you don't have adjacent pins soldered together ! It'd be easy to have data going to one pin 'cross over' to the next one...
samu350



Joined: 27 Jan 2019
Posts: 9

View user's profile Send private message

PostPosted: Sun Mar 17, 2019 5:53 pm     Reply with quote

temtronic wrote:
Without seeing the datasheet for the GLCD or the dsPIC
My first guess is that you haven't disabled some internal peripherals that also use the pins the GLCD is now attached to.
To help debug, I'd use simple text not some fancy animation. The simpler it is the better to confirm data IS going where it's supposed to.
Also confirm you don't have adjacent pins soldered together ! It'd be easy to have data going to one pin 'cross over' to the next one...


Your first guess is right, didn't disable these. Yes I was testing with a small square, but the animation was the first thing to come up with that issue.
I'll check if these pins are wrongly connected, I'm using a breadboard.

Thanks!
Ttelmah



Joined: 11 Mar 2010
Posts: 19559

View user's profile Send private message

PostPosted: Mon Mar 18, 2019 2:54 am     Reply with quote

RG2.

Data sheet.

"If RG2 and RG3 are used as general purpose inputs, the VUSB3V3 pin must
be connected to VDD."

Also obviously the USB peripheral must be off.

On a lot of chips, the USB pins are input only. Your's doesn't have this, but
generally, USB pins should be avoided if possible....
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