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.

[moved] Leds not glowing on LAT command in pic18F85j11

Status
Not open for further replies.

gne_577

Junior Member level 3
Junior Member level 3
Joined
Jun 23, 2013
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,514
Hello

I made a development board using pic18f85j11. It works fine as i check the port by glowing LED connected in sink pattern. I connected all the LED on H port.According to thuMb rule its code should be


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
void main ()
{
ADCON1=0XFF;   \\ analog converted  into digital
TRISH = 0X00; 
DELAY(50);
while(1)
{
LATH = 0X00;
DELAY(50);
 
LATH = 0XFF;
DELAY(50);
}



But It didnt works in this manner as i mentioned as i written above code.

It just follows the

TRISH=0x00;
or
TRISH=0xFF;

it didn't follow the LATH command.

At the output i didn't connect any pull up if require then what should be its value..??

My circuit works on 5V
Controller on 3.3V

and Driving resistance for led is 330ohm for glow.

All Leds are connected in Sink operation.

Thank you
 
Last edited by a moderator:

What do you mean by "My circuit works on 5V. Controller works on 3.3V"? if you mean the LEDs are powered from 5V, consider that even if the PIC port pins are high (~3.3V) there is still 1.7V across the LED which might be enough to light it.

Brian.
 
First of all thanks for your reply. I just try to separated the power lines that's why built the circuit in 5 voltage and controller in 3.3V

anyway thanks a lot I'll take care in future. :)

- - - Updated - - -

Oh THATS GREAT IT WORKS AWSUMMMMM TOnnes of thanks.. :)
One thing i want to know I also interfaced a LCD 20X4.

Should i change its voltage from 5V to 3.3V..???


Because as i send some data on that port the characters are blinking very fast and controller becomess much hot almost near to burn.

Thanks in advance :)
 

Nothing should run hot. It should be barely warmer than room temperature. You should NEVER interface a mirco directly to a device running at higher voltage unless the pins are specifically designed to do so. For example, some PICs work on 3.3V maximum VDD but have 5V tolerant pins.

In reality you have three options:
1. You can power the LCD from 5V but not connect it anywhere to the PIC supply and hope the 3.3V logic levels are enough to drive the LCD inputs.
2. You can drive the PIC pins low, add pull-up resistors at the pins and drive the TRIS bits instead of LAT bits if the pins are 5V tolerant.
3. You can add additional circuitry to convert the 3.3V signals up to 5V.

If you look at the 18F85J11 data sheet pin diagrams you will see some are 5V tolerant and some are not. It doesn't mean the 5V tolerant pins can produce 5V, it means they can withstand 5V if you provide it from outside. So you can use option 2 above with pull-up resistors to the 5V line.

Brian.
 
Okay Sir

I just add the pull up sip resistance of 10KOHm on the Data Lines from D0-D7 ( Pin no 7 to 14 ) and Same value of resistance on enable and RS pin. The Supply of LCD on pin no 15 &16 and Pin no 1,2,3 = 5V. The LCD Supply is separated from the Controller Supply by using separate 7805IC but still error is same :(
Controller heats up continuously at high rate
 

Can you post the full schematic - something is obviously wrong and it sounds like it's an electrical problem. It should run cold.

Brian.
 
Hello Sir...
Again you are right... It is an electrical problem my controller is damaged. i just changed it with new one it works fine now :)
 

Sir Is it possible that we can run20x4 character LCD and 4x4 keypad on same port ..??
 

Yes, with the proper resistors in series so the keys cannot short the LCD lines and produce data miscommunication. Only the ENABLE pin cannot be shared.
 
thank you sir ..

Can you please put the schematic of LCD and Keypad connections for the same port .?
I'm new in this field that is a great help :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top