Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

dsPIC33 otput voltage problem

Status
Not open for further replies.

gsg

Junior Member level 1
Joined
Feb 23, 2010
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,434
HI,

I'm testing a dsPIC33FJ128MC202 and trying to run a basic program to blink an LED .
The programming (with PICKIT2) is working fine but the voltage that I get at logic1 is 1.43V.

How do I get the pin to output higher voltage?

I've tried changing core capacitor but it doesn't seem to affect anything.
Where could the problem be? Please help.
 

Hi,
I think you are running the dsPIC at 3.0v or 3.3v, and you are measuring the voltage with a DMM or DVM.
The meter shows the average value, 1.43v as you have 50% on time and 50% off time, so your average voltage is around 1.5v and you get 1.43v
The voltage during ontime is probably 3.0v and not 1.43v as you have measured.

Does your LED blink? If it does, then there probably is no problem, provided you have given a current-limiting resistor. Try placing a green LED, which has a Vf of approximately 2.2-2.4v. If the green LED blinks, you can rest assure, your output is NOT 1.43v during on time.

Hope this helps.
Tahmid.
 

Thanks for your replies.

I do have a current limiting resistor it doesn't help. And even when i do not connect the LEDs the controller pin shows 1.43v at logic high.

I'm quite sure it's not giving an average value because I'm using a very low frequency and I can see it going from 0v to 1.43v on the multimeter.

Does dsPIC require any registers of be set? here's the code
Code:
#define __sdPIC33F__
#include <p33FJ128MC202.h>

void cDelay (int );

int i;

void main()
{
	
_TRISB15=0;

while(1)
{
PORTBbits.RB15=1;

cDelay(2000);

PORTBbits.RB15=0;

cDelay(2000);

}
}

void cDelay(int tim)
{
int j;
for(i=0;i<tim;i++)
for(j=0;j<1000;j++);
}
 

Hi,
What about the configuration bit settings? I don't see them in the code. Maybe that causes the problem.

Added after 1 minutes:

And change
Code:
PORTBbits.RB15=1;
to
Code:
LATBbits.LATB15 = 1;
And ensure that the comparators and ADCs are turned off.
 

Hi,

k it seems there was a voltage supply problem in the entire PCB. The ground plane was not at 0V. I removed two decoupling capacitors and now ground plane is at 0v and all supply voltages are correct.

But now when I program the dsPIC there is to output at all. The IC gets programed and verified correctly (from both pickit2 and MPLAB) but there's no volyage at any pin.
Other voltages are:
Pin28: 3.3v
pin13: 3.3v
Pin1: 3.3v
Pin20: 2.6v
All other pins: 0v

Ive tried simpler codes like this
Code:
#include <p33FJ128MC202.h>
 
 int main(void)
 {
   
    AD1PCFGL = 0xffff; //All analog capable pins in digital mode
    TRISA = 0; //All pins output
    TRISB = 0; //All pins output
    PORTA = 0xFFFF; //All pins low
    PORTB = 0xFFFF; //All pins low
    
    
    while(1);
    return 0;
 }
Could the IC be damaged somehow?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top