Search found 12 matches

by treefort
Thu Oct 07, 2010 3:41 am
Forum: Put'm Here
Topic: Sleep mode with pic18f452 problem
Replies: 6
Views: 10630

I found the culprit. I was measuring and desoldering 2 different boards so somehow I got mixed up. The LM317 is pulling 3.8mA quiescent current. And my nrf24L01 is pulling the rest...3mA or so. I am going to have to power the nrf24L01 off of an output and get a MCP1702 regulator which only draws 2uA...
by treefort
Thu Oct 07, 2010 2:33 am
Forum: Put'm Here
Topic: Sleep mode with pic18f452 problem
Replies: 6
Views: 10630

Another question...


With my pic and the max323 chip pulled from the pic-p40 board I am drawing 6-7mA!?

I measured the draw at the resistor on the LM317 and it was 3.8mA or something to ground.

Shouldn't I be able to reduce the current draw down to uA???


Thanks,
by treefort
Wed Oct 06, 2010 11:30 pm
Forum: Put'm Here
Topic: Sleep mode with pic18f452 problem
Replies: 6
Views: 10630

Hi Pyro, Late last night I got the sleep function working. Here is my little snippet of code with the sleep command in it: if (overflow >= 2289) // 15 seconds { overflow = 0; T1CONbits.TMR1ON = 0; /* Disable the timer */ PORTA=0x00; PORTB=0x00; PORTC=0x00; PORTD=0x00; PORTE=0x00; Sleep&...
by treefort
Wed Oct 06, 2010 12:38 am
Forum: Put'm Here
Topic: Sleep mode with pic18f452 problem
Replies: 6
Views: 10630

Ok,

I checked the disassembly window and it appears as though my newly created project is using a different .c file than what I was inserting breakpoints on. I have created a new project and will see what I find!

Thanks for looking. Hope I didn't waste too much of anyone's time.
by treefort
Tue Oct 05, 2010 11:52 pm
Forum: Put'm Here
Topic: Sleep mode with pic18f452 problem
Replies: 6
Views: 10630

Sleep mode with pic18f452 problem

Hi all, I can't get my pic to fall asleep. I have quite a bit of code, so I will only insert the main. I read that all interrupt flags must be cleared before entering sleep. Could this be the problem? Or is it going to sleep and then instantly waking up? I have tried inserting a breakpoint but mplab...
by treefort
Tue Aug 31, 2010 5:15 am
Forum: Projects
Topic: A/D conversion
Replies: 3
Views: 4965

Thanks for the reply and advice :) I think its working pretty good now. I just checked again and measuring first the LM35 was sending .197V to the pic. In debug mode ADRESL had 29h in it. 29h == 41d. 41/1023 * 4.83V = .194 I had to pause the program in debug mode to see the values in the special reg...
by treefort
Tue Aug 31, 2010 3:28 am
Forum: Projects
Topic: A/D conversion
Replies: 3
Views: 4965

A/D conversion

Hi all, I have wrote a simple program that I think should work but I'm not seeing what is expected in the ADRESL and ADRESH registers when I go into debug, view special registers. I have an LM35 hooked directly up to RA0. The LM35 is outputting .18V to the input as measured with a DMM. When I run in...
by treefort
Sun Aug 29, 2010 5:49 am
Forum: Tutorials
Topic: Interfacing A PIC To LCD (16x2)
Replies: 18
Views: 24410

Thank you for the configuration bits tip! I changed it back to PORTA and it works as expected. I've been reading up and I now see how the ADCON1 register works. Thank you for clarifying. I now have the program fully commented for my fresh head so I think I'm ready to move onto reading and displaying...
by treefort
Sat Aug 28, 2010 9:29 pm
Forum: Tutorials
Topic: Interfacing A PIC To LCD (16x2)
Replies: 18
Views: 24410

Hello again, This should be an easy one for you. I decided to go back to square 1 and only try to turn on the LED that is hooked up to PORTA0. But the LED doesn't come on. When I measure with a DMM from RA0 to VSS I get 0V. Here is my code: #include <p18f452.h> void main(void) { ADCON1 ...
by treefort
Sat Aug 28, 2010 7:35 pm
Forum: Tutorials
Topic: Interfacing A PIC To LCD (16x2)
Replies: 18
Views: 24410

Hi, I read that the lcd will show blocks before it has been properly initialized. After it has been initialized the screen will go blank. I tried putting a Delay10KTCYx(200); after lcd_init(); in case it needed more time but still nothing. I guess I could try 8-bit mode. I'll have to do a little res...
by treefort
Sat Aug 28, 2010 6:06 am
Forum: Tutorials
Topic: Interfacing A PIC To LCD (16x2)
Replies: 18
Views: 24410

Hi, thanks for the quick reply :) I soldered the 4 data wires to PortC and still no go. I also noticed that the contrast only works when plugged into the pickit2, and not external power. I measured the power from both sources and the pickit2 is outputting 5V and the external power is 3.3V. The lcd i...
by treefort
Sat Aug 28, 2010 1:50 am
Forum: Tutorials
Topic: Interfacing A PIC To LCD (16x2)
Replies: 18
Views: 24410

Hi all, I am trying to get my lcd working but everytime I build I get an error stating: Executing: "C:\MCC18\bin\mplink.exe" /l"C:\MCC18\lib" "lcd_pic.o" /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"new.cof" /M"new.map" /W MPLINK 4.1, Linker Copyright (c) ...

Go to advanced search