dspics - just starting out

Thread Starter

Art

Joined Sep 10, 2007
806
Hi Guys,
I’m looking at doing my first project with a dspic 33FJ64GP chip that wants a 3.3 Volt supply.
I’m sure I’ll have the supply sorted out with a fixed regulator LM2576.

My question has to do with the chip being connected to 5 Volt peripherals such as character LCDs
or other pic chips that use 5 Volt supply.
Does this mean you also need a 5 Volt regulator on the same board, and do level conversion for everything?
In that case why not use a resistor divider to power the dspic form the 5 Volt regulator?

In the case of connecting the DSpic to a 5 Volt pic pin, would small signal transistors suffice?
Cheers, Art.
 

ak52

Joined Oct 15, 2014
230
Hello,
There are LCDs available which run on 3.3v,what LCD are you using?
A simple solution is to use a 5v LDO connected to a 3.3v LDO/switching regulator(Depending on your PCB space requirements).

A few issues need to be addressed when powering PIC from voltage dividers.This is not very efficient way of powering PICs.
The PIC will draw a vary-ing amount of current depending on what you are it is executing.
This will vary the total current drawn through top resistor and will change the voltage across bottom resistor across the PIC.
A protection diode like a zener or a tvs diode must be used and the diode must be able to handle more than this maximum current draw.And on top of that you still need filter capacitors at the input and outputs.
A simpler way is to use voltage regulators which would take care of all these things for you.

AK
 

Thread Starter

Art

Joined Sep 10, 2007
806
Ok, thanks for the replies :) The LCDs are 2 units of 2x16 char or 2x20 char Hitachi based character LCDs.
The reason for 2 x 2 line units is for where they have to be a horizontal display rather than a single 4 line unit wouldn’t fit.
I already have plenty of these (5 Volt supply units) and would like to select the biggest two units that fit.

jpanhalt, I’m sure if it’s a common problem, Maxim probably have a big chip with rows of inputs/outputs but I have not yet looked.

In the picture you linked, D3 is just an ordinary 1N4148? i.e. not a zener because it’s a DC clamp?
I don’t understand the top one (3V to 5V translation). Do you care to explain it?
Other than that, I’ll get started and wait till I get stuck, and come back with an actual problem.
 

jpanhalt

Joined Jan 18, 2008
11,087
jpanhalt, I’m sure if it’s a common problem, Maxim probably have a big chip with rows of inputs/outputs but I have not yet looked.

In the picture you linked, D3 is just an ordinary 1N4148? i.e. not a zener because it’s a DC clamp?
I don’t understand the top one (3V to 5V translation). Do you care to explain it?
Other than that, I’ll get started and wait till I get stuck, and come back with an actual problem.
1) It is not a problem any more than any other design requirement.
2) Go to the Sparkfun site and read about those designs. Did you look at any of the links I provided? The first link not only also explains the designs from Sparkfun, which are quite common and not proprietary, but gives some other options, including direct connect (Tip#5).
3) Just buy the Maxim chip.

John
 

ErnieM

Joined Apr 24, 2011
8,377
Ok, thanks for the replies :) The LCDs are 2 units of 2x16 char or 2x20 char Hitachi based character LCDs. The reason for 2 x 2 line units is for where they have to be a horizontal display rather than a single 4 line unit wouldn’t fit. I already have plenty of these (5 Volt supply units) and would like to select the biggest two units that fit.
When faced with the same issue off a 3.3V PIC I went thru some complicated things that were completely unnecessary had I read the spec sheet on my display: Seems a 3.3V logic 1 voltage is well within the sped’ed limit of inputs on my displays and they would have been quite happy when just driven off 3.3V logic signals.

Do check your specific devices data sheet but I would expect the same spec.

For other devices (such as I2C busses) there are dedicated level translators available.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Sorry John, I did glance at the links, and check if my local electronics place stocked the Philips device,
which unfortunately they don’t.... but something like that might be on Maxim free samples list.

ErnieM, If that is common, then I probably have a pair of LCDs that will work.

It’s for Sun & Moon calculator algorithms I want the dspic for.
The whole board only has to have the 3.3 Volt variant of Maxim's RS232 transceiver (which I do know exist),
and the two LCD displays, and that all for that whole board. The time date and location data for the algorithms
is already being sent over the RS232.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Perhaps I should have gone for a dspic 30F series which can run up to 5.5 Volts.
I wasn’t aware there were any 5 Volt pics that still worked with C30 compiler.
Oh well.. I’ve come too far now, already have a dual supply board and dspic 33F flashing an led.
 

Thread Starter

Art

Joined Sep 10, 2007
806
I might be useful to open up for criticism, so any thoughts would be appreciated :)

Though I have a few different LCDs, the one I want to use expects 4 Volts for logic high,
and my reading suggests they are the kind that won’t work without level shifting.

In the picture, the two orange LEDs are lit because both 5 & 3.3 volt supply rails work.
To the left of the orange LEDs, the 74HC04 provides the clock signal to the dsPic
via the transistor clamp example given in the Microchip document linked by jpanhalt:



The highest value series resistor R1 from the 74HC04 output that would clock the dsPic is 1K.
The next higher value I tried for R1 was 4.7K which did not get the pic started from the external clock.
Q1 on the protoboard is BC557B.

The third LED (first green LED from the left) is lit because the dsPic is running a timer flashing it
at 1 Hz, 50% duty cycle. This LED is supplied from he 3.3 Volt rail, and sunk by the IO pin.

The fourth LED (second green LED from the left) is lit because a second 74HC04 sees a
logic low on another IO pin connected to it. This LED does also flash at 1 Hz rate though,
proving the logic high from the dsPic is recognised. Both 74HC04 chips are supplied 5 Volts.

The dsPic IO pins connected to the 74HC04 are connected directly with no pulp/down resistors.
Is this ok?
I know I will have to drive the whole LCD display with inverted control signals and data.

 

Thread Starter

Art

Joined Sep 10, 2007
806
Ah well it’s working so far with 74HC04. I wouldn’t have thought HS family was ideal.
It doesn’t calculate any astronomy yet, just prints it.

 

NorthGuy

Joined Jun 28, 2014
611
Unless there's a compelling reason, it's good to have everything in single voltage.

Latest and greatest dsPIC33EV runs at 5V and has shadow registers to die for.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Thanks for the tip :)
This one was successful at least.
There is a reason, an astronomy calc needs location data,
And that will probably be a Ublox GPS module.
 
Top