View previous topic :: View next topic |
Author |
Message |
samu350
Joined: 27 Jan 2019 Posts: 9
|
Problem with GLCD.C driver on dsPIC [Solved] |
Posted: Sun Mar 17, 2019 5:34 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
samu350
Joined: 27 Jan 2019 Posts: 9
|
Re: Problem with GLCD.C driver on dsPIC [Solved] |
Posted: Sun Mar 17, 2019 5:40 pm |
|
|
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](images/smiles/icon_smile.gif)
Last edited by samu350 on Sun Mar 17, 2019 5:51 pm; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9173 Location: Greensville,Ontario
|
|
Posted: Sun Mar 17, 2019 5:45 pm |
|
|
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... |
|
![](templates/subSilver/images/spacer.gif) |
samu350
Joined: 27 Jan 2019 Posts: 9
|
|
Posted: Sun Mar 17, 2019 5:53 pm |
|
|
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! |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19366
|
|
Posted: Mon Mar 18, 2019 2:54 am |
|
|
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.... |
|
![](templates/subSilver/images/spacer.gif) |
|