[SOLVED] PIC 18F452 ,LM35 input unstable

Status
Not open for further replies.
i grounded the pin 2 (RA0) of PIC and then applied the power then with low capacitance values (pF) at 555 the displayed temp which should be 0, instead it is fluctuating b/w 2 to 0 means with low capacitance values the noise is appearing in ground line
am i correct ?
how to eliminate it?


thanks
 

Show us your wiring , take a photo...
If the ground surface is too small you can get this kind of problem.
Try to have only one point to ground Analog, digital and power supply
and add capacitor 100nF between power supply VDD-VSS
 

Show us your wiring , take a photo...

due to junk of wires it would be difficult to take an intelligible photo but i will try


If the ground surface is too small you can get this kind of problem.
Try to have only one point to ground Analog, digital and power supply

plz explain above statement as my whole circuit is driven by single power supply all have same ground and VCC

add capacitor 100nF between power supply VDD-VSS

i used 4.7uF, 1uF, 100nF and 10nF capacitors b/w power supply but still no effect no any advantage of using them


thanks
 

I think you can add a small RC filter that attenuates roughly 10 times at 41 kHz that should be the frequency of your 555.
Simply remove the wire between pin 2 (output) of LM35 and pin 2 (ADC input) of the PIC. Connect these two pins using a 10 kohm resistor. Place now a 4.7 nF capacitor between pin 2 of PIC to ground.
This filter has to be as close as possible to the input pin of the PIC.
 


i connected 10Kohm resistor b/w pin 2 and ground and 10nF capacitor (as nearer available) b/w ground and pin2 of PIC but still temp displayed should be zero instead it varying b/w 3 and 0



thanks
 

i connected 10Kohm resistor b/w pin 2 and ground and 10nF capacitor (as nearer available) b/w ground and pin2 of PIC but still temp displayed should be zero instead it varying b/w 3 and 0

Probably I didn't explain very well. The 10k resistor has to be connected from pin2 of LM35 and pin2 of the PIC (that is the input of ADC). At present you have a wire from pin2 of LM35 and pin2 of the PIC: simply replace that wire with the resistor.
It seems, instead, you connected properly the capacitor.
 


formerly i wanted to see only the noise in ground line first eliminate it than take voltage values from LM35
now i did the same as instructed but no effect at displayed values still varying...



thanks
 

OK, this means isn't a problem due to noise on the line.

Do you use the 555 output to clock the ADC to which the temperature sensor is connected ? It seems you have problems with adc timing. I don't know the PIC and I'm not able to check your code. However I suggest you to verify that the constrain reported on the data-sheet on the ADC topic are satisfied.
 

hello,

another way to check;
i didn't any quartz + capacitor on schematic
it seems you are using internal oscillator on this PIC ?

but config is
CONFIG OSC=XT, PWRT=ON, BOR=OFF, WDT=OFF, LVP=OFF, DEBUG=OFF

XT is for Quartz ?

With a not clean wiring , you can have interference with the internal oscillator of the PIC.
Try to use a quartz ex 4MHz + 2x22pF to fixe a good clock for the PIC
 



the o/p of 555 is given to the counter i/p of PIC,
how it can effect the ADC timing when i have selected "internal RC for clock source" by keeping ADCS0 and ADCS1 bits high of ADCon0 register and it is working well with high capacitance values (micro and nano) of 555 .....



- - - Updated - - -



it is a Proteus schematic in which power and oscillator are hidden
i have used 4MHz crystal with 15pF capacitors



i am running out of time as i have to submit my project plz help


thanks
 

hello

did you try to use FOsc for ADC instead of internal RC oscillator



;ADC CONFIGURE
BSF CTRL,ADC
MOVLW 01H ; Fosc/2 or 41H FOSC/8 ... instead of C1H
MOVWF ADCON0
.....

also
see datasheet 11.2
2: When the device frequencies are greater than 1 MHz, the RC A/D conversion clock source is only recommended
for SLEEP operation.
 
Last edited:


by using FOSC/8 the variation reduces but did not end now there is +-2°C variation in the display

i also checked the ground level on oscilloscope there is voltage varying from 5mV to 15mV


thanks
 

hello,

you turn around the main problem,
as i allready said in post #19
you get a measure +- 1bit => +-2°C
NORMAL !! Because 8 bits only.

treat measurment with 10 bits, so the weight of +- 1 bit will decrase
drasticly.

do step by step to solve your problem:
Solve adc measure to say : yes,no probleme on ADC
before to polarise on NE555
 


as told before temperature to be measure will be below 50°C around 30°C and with 8 bits maximum temp that can be measured is
FF=255
1 bit=4.8mV
255x4.8=1224mV
10mV for 1°C
1224mV for 122.4°C

so i am not in need of using upper 2 bits
and if ADC measurement is wrong why the variation is appearing when higher value capacitor (nano and micro F) are used??
and plz explain ground voltage noise what to do about it?


thanks
 

hello

I cam back to asm, after a long time not using , now i prefere to use C18 !
to do same test on ADC with a LM35DZ 10mV/°C 0mv at 0°C

Question: is your asm code coming from MPLAB ASM , because it seems comming from a compiler result ?

I use RS232 for diplaying the result , but you can easy to adapt to a LCD .
Measure is very stable , even i am using a prototype board and no filter on LM35DZ signal.
My power supply is a LINEAR power supply ( LM309K)
I have only one couple of condensateur between VDD and VSS , but next to the pins of 18F ( 4,7µF tantale // 100nF)
see result... with an average of 10 measures : stable at 0,1°C


individual measure is 44 points
multiplie * 10 by averaging and divide by 2
to have the relation 1000 pts for 500°C without using floating point calculus..
(maxi error is 2,3% full scale)
In Bcd_temp , i add the point for decimal diplay
you can use your LCD subroutine instead of Rs_Putchar.

and delay 1 seconde OK , i tested with Q=10MHz and Q=4MHz (i don't have 2Mhz quartz)

could you post a zoom of the NE555 part and components around it
and il wil add this device and see if i get same problems.
 

Attachments

  • _18F252_ADC_UART.zip
    25.9 KB · Views: 42

hello again,


I install NE555 + 100K +330 + 100pF .. i get a frequncy of 54260Hz on RA4 input .(i don't have 175pF)..
NO CHANGE on LM35 measure !!!
i change capacitor 100pF to 4µF so frequency on RA4 becomes less than 2Hz
NO CHANGE on LM35 measure !!

It means, you have problem in your code ( and maybe in your hardware) .

You will never success if you don't want to separate functionality.
fisrt test ADC measure stand alone...
Try the previous example ,i sended just before , to test ADC measure , and
beside your NE555 connected to RA4 input ..

.


By the way, why are you using EQU to define the ram variable as :

PH EQU 56H
PL EQU 55H
Q1L EQU 54H
Q1H EQU 53H
Q2 EQU 52H
Q3 EQU 51H


BCD2ASCII:
MOVF 51H,W
IORLW 30H
MOVWF Q3
MOVF Q2,w
IORLW 30H

you better have to define by using

CBLOCK 0x0000
PL
Q1L
Q1H
Q2
Q3
var1 ; to replace 51H

ENDC

idem here
MOVFF TMR0L,55H ;TMR0L MUST BE COPIED FIRST
MOVFF TMR0H,56H ;TMROH MUST BE COPIED AFTER
MOVLW 8EH ;36352 Hz IN DECIMAL
CPFSGT 56H

Use variable, not EQU !
to avoid mistake in program,or misunderstund by other reader


I added the Frequency measure ,with NE555 connected on RA4, count by timer0 16 bits, during SEC_DELAY of 1 second

Code:
;paulfjujo 23/02/2013


		list p=18f252		
		#include <p18f252_.inc>	;processor specific definitions
		
	CONFIG OSC=HS  ,OSCS=OFF
	CONFIG BOR=OFF
	CONFIG WDT=OFF ,CCP2MUX=OFF
	CONFIG STVR=OFF, LVP=OFF, DEBUG=OFF
	CONFIG CPB=OFF	; boot protect off
	CONFIG CP0=OFF,CP1=OFF,CP2=OFF,CP3=OFF
	CONFIG CPD=OFF
	
	;----  select here Quartz & Baud rate RS232 ------------------------

#define FOSC D'10000000'	; quartz 10MHZ
#define BAUD D'19200'
#define DIVIDER (FOSC/(D'16' * BAUD))-1
	
; NE555 on RA4  
;100K   	
;330
;100pF      4,7µF
;54320Hz 	<2Hz


ADC EQU RA0
LCD_DATA EQU PORTB
CTRL EQU TRISA
RS EQU RC0
RW EQU RA2
EN EQU RC1
CI EQU RA4  ; from NE555 output
HT EQU RA5
FN EQU RA6
Led1 EQU 2

    CBLOCK	0x0000
  
    PHigh
    PLow
    Q1L	
    Q1H	
    Q2 
    Q3 
    Var1 
    Var2
;--
    Count
    NbMesures
    Drapeaux	; multipurpose flags
;Drapeau:7= signe mesure temp 1=negatif 0=positif pour DS1624
;Drapeau:6= Elligibilite de stockage mesure
;Drapeau:5 =test si saisie binaire ou BCD
;Drapeau:4= choix format 1=999   0=65535 pour bcd53 (5 ou 3 digits)
;Drapeau:3= choix format 1=XX    0=XXX pour bcd3
;Drapeau:2= choix output 1=Rs232 0=LCD
;Drapeau:1= choix format 1=XXXX.X  0=XXXXX pour bcd5
;Drapeau:0= pour effacer zero inutile

; Bcd
    Mcount
	btmp
	btmp1
	dixmil	
	mille
	cent
	dix
	uno
	value		
; variables 16 bits
 	MesAn0	    :2	
	valx        :2
	val1		:2			; val1=LOW  Val1+1=HIGH
	val2		:2
	Cumul		:2
	reste		:2
	result	    :2
    ENDC

	ORG     0x0000		;place code at reset vector
	nop
	nop
	goto    Start
	;This code executes when a high priority interrupt occurs.

		ORG	0x0008		;place code at interrupt vector

HiIntCode:	;do interrupts here
        nop
		reset			;error if no valid interrupt so reset

;----------------------------------------------------------------------------
;This code executes when a low priority interrupt occurs.

		ORG	0x0018		;place code at interrupt vector

LoIntCode:	;do interrupts here
        nop
		reset			;error if no valid interrupt so reset

;----------------------------------------------------------------------------
	
;#define TESTING

Start
    CLRF TRISC
    CLRF Drapeaux
   ; init RS232  
    bsf TRISC,RC7	    ; RX UART
	movlw	DIVIDER 	;set baud rate 
	movwf	SPBRG
;	Q= 10MHZ  19200 bauds
	movlw	0x24		;enable transmission TXEN=1 and BRGH=1 high baud rate
;	Q=4MHZ 4800 bauds
;   movlw 0x20
	movwf	TXSTA
	bank0
	movlw	0x90		;enable serial port SPEN=1 and reception CREN=1
	movwf	RCSTA
	
	; presentation
	  MOVLW .12       ; CLS
    call Rs_Putchar  
    call SEC_DLY
      
    MOVLW 'S'
    call Rs_Putchar
    MOVLW 'T'
    call Rs_Putchar
    MOVLW 'A'
    call Rs_Putchar
    MOVLW 'R'
    call Rs_Putchar
    MOVLW 'T'
    call Rs_Putchar
    MOVLW .10
    call Rs_Putchar
    MOVLW .13
    call Rs_Putchar
    
    

;config TIMER1,16 BIT, INT-CLK, PRESCALER 1:8	
; 0xB0h  mode 2x8bits, innternal clock Fosc/4 prescaler=1/8, TRM1 OFF
	MOVLW b'00110000' 	 
    MOVWF T1CON
    BCF PIR1,TMR1IF
    BCF PIE1,TMR1IE ; NO interrupt
    BSF IPR1,TMR1IP ; hig priority interrup (if used!)
    MOVLW  0x0B
    MOVWF TMR1H
    MOVLW  0xDB
    MOVWF TMR1L
    BCF T1CON,TMR1ON ; timer1 OFF  , not yet used
    

   	;CONFIGURE Timer0 as COUNTER 
    BSF PORTA,4     ; RA4 as input
    MOVLW 28H	    ;No prescaler,Transition on T0CKI pin, low edge ,COUNTER, 16BIT
    MOVWF T0CON
    BCF INTCON,TMR0IF
    BCF INTCON,INT0IE

;ADC CONFIGURE
    BSF CTRL,ADC
    MOVLW 0C1H
    MOVWF ADCON0
    MOVLW 8EH
    MOVWF ADCON1
    CALL DELAY
    
   movlw .10
   movwf  NbMesures
   clrf Cumul
   clrf Cumul+1

MainLoop:
;PROCESSING TEMP
 ifdef TESTING
   ; simule ADC0 = 0039
    movlw .40
    movwf val1
    clrf val1+1
 else
   BSF ADCON0,GO
   CALL DELAY
BACKADC
   	BTFSC ADCON0,DONE
	BRA BACKADC
	NOP
	MOVF ADRESL,W
	movwf val1       ; prepare for convert
	MOVF ADRESH,W
	movwf val1+1
  Endif  
    bcf Drapeaux,5  ; mode 5 digits   to see 00000 up to 01023
	call bcd_temp 
	MOVLW .9            ;  Tabulation
    call Rs_Putchar
    ; moyennage pour augmenter la resolution
    bcf    STATUS,C
  	movf   val1+1,W		; addition 16 bits
	addwf  Cumul+1,f	; cumul = cumul + valx
	movf   val1,W
	addwf  Cumul,f
	btfsc  STATUS, C
	incf   Cumul+1,f
	decfsz  NbMesures
    goto MainLoop
  
	movf Cumul,W    
	movwf val1      
	movf Cumul+1,W
	movwf val1+1
	bcf Drapeaux,5 ; mode XXXX
	call bcd_temp 

; divide by 2 !!
    bcf    STATUS,C
    rrcf val1+1,f     ; rotate right through carry
	rrcf val1,f

; cumul = (somme de 10 raw data) /2
	; car 1023 points pour 500°C arrondi a 1000*10/2
	bsf Drapeaux,5,0  ; mode xxx.XX
	call bcd_temp 
	clrf Cumul
	clrf Cumul+1
	movlw .10
    movwf  NbMesures
	MOVLW .9
    call Rs_Putchar
  

;processing humidity
	MOVLW 'F'
    call Rs_Putchar
    MOVLW '='
    call Rs_Putchar
    CLRF TMR0H	 ;TMR0H MUST BE LOADED FIRST
    CLRF TMR0L	 ;TMROL MUST BE LOADED AFTER
    BSF T0CON,TMR0ON	; arme comptage sur RA4 Timer0
    CALL SEC_DLY        ; uses Timer1 for 1sec elapsed time
    BCF T0CON,TMR0ON    ; stop comptage sur RA4
  ; display result
    MOVFF TMR0L,PLow	 ;TMR0L MUST BE COPIED FIRST
    MOVFF TMR0H,PHigh	 ;TMROH MUST BE COPIED AFTER
  ; affiche frequence  
    movf PLow,W
    movwf val1
    movf PHigh,W
    movwf val1+1
    
  ;  movlw 0xFF
  ;  movwf val1
  ;  movwf val1+1; test 65535
      
    bcf Drapeaux,5,0  ; mode XXXXX
	call bcd_temp 
	MOVLW .10
    call Rs_Putchar
    MOVLW .13
    call Rs_Putchar
	

    MOVF PHigh,W    ;
    MOVLW 8EH	   ;MSB de 36352 Hz IN DECIMAL
    CPFSGT PHigh      ; compare and skip if PH > TMR0H
    goto ho
    goto co
ho:
    BSF PORTC,Led1         ;    BSF PORTC,2	
 ;   BCF PORTC,3	
    goto MainLoop
co:
    BCF PORTC,Led1         ;PORTC,2	
 ;   BSF PORTC,3	
    goto MainLoop

    goto MainLoop   ; <- what for ?




;CALL FUNCTIONS

VALUEWRT:
    MOVF Q3,w
    MOVWF LCD_DATA
    BSF PORTC,0
    ;BCF CTRL,RW
    BSF PORTC,1
    CALL DELAY
    BCF PORTC,1
    MOVF Q2,w	
    MOVWF LCD_DATA
    BSF PORTC,0
    ;BCF CTRL,RW
    BSF PORTC,1
    CALL DELAY
    BCF PORTC,1
    MOVLW '.'       ; 2EH	   
    MOVWF LCD_DATA
    BSF PORTC,0
    ;BCF CTRL,RW
    BSF PORTC,1
    CALL DELAY
    BCF PORTC,1
    MOVF Q1L,w
    MOVWF LCD_DATA
    BSF PORTC,0
    ;BCF CTRL,RW
    BSF PORTC,1
    CALL DELAY
    BCF PORTC,1
    MOVF PLow,w	
    MOVWF LCD_DATA
    BSF PORTC,0
    ;BCF CTRL,RW
    BSF PORTC,1
    CALL DELAY
    BCF PORTC,1	
    RETURN

HEX2BCD:
    CLRF PHigh
    CLRF PLow
    CLRF Q1L
    CLRF Q1H
    CLRF Q2
    CLRF Q3
    MULLW 30H	 ; W * 48 -> PRODH & L   40 points a 20°C => 40x48=1920
    MOVFF PRODH,PHigh	 ;upper byte of product result
    MOVFF PRODL,PLow	 ;lower byte of product result
    MOVLW 0AH
    CLRF Q1L
VV:	INCF Q1L
    BC AA
VV1:SUBWF PLow
    BC VV
    DECF PHigh
    BN AA1
    BRA VV	
AA: INCF Q1H
    BRA VV1
AA1:ADDWF PLow
    DECF Q1L
;*************	
VV2:INCF Q2
    SUBWF Q1L
    BC VV2
    DECF Q1H
    BN AA2
    BRA VV2
AA2:ADDWF Q1L
    DECF Q2
;**************	
VV3:INCF Q3
    SUBWF Q2
    BC VV3
    ADDWF Q2
    DECF Q3
    return


BCD2ASCII:
    MOVF Q3,W
    IORLW 30H
    MOVWF Q3
    MOVF Q2,w
    IORLW 30H
    MOVWF Q2
    MOVF Q1L,w
    IORLW 30H
    MOVWF Q1L
    MOVF PLow,w
    IORLW 30H
    MOVWF PLow
    RETURN


COMDWRT:
    MOVWF LCD_DATA
    BCF PORTC,0	 ;RS=0
    ;BCF PORTC,1	 ;R/W=0
    BSF PORTC,1	 ;EN=1
    CALL DELAY
    BCF PORTC,1	 ;EN=0
    RETURN


DATAWRT:
    MOVWF LCD_DATA
    BSF PORTC,0
    ;BCF CTRL,RW
    BSF PORTC,1
    CALL DELAY
    BCF PORTC,1
    RETURN
    
    
Rs_Putchar
; put your routine to display char on LCD
; after writing the car, the position on LCD must be increased
; use your code instead of this code
   		btfss	PIR1,TXIF	
   		goto Rs_Putchar
		movwf TXREG	;data transmit
		return
    
    
    
    
    

DELAY:
    MOVLW 1FH
    MOVWF Var2
AGAIN:
    NOP
    NOP
    DECF Var2,f
    BNZ AGAIN
    return

LDELAY:
    MOVLW 5FH
    MOVWF Var1
AGAIN1:
    NOP
    NOP
    DECF Var1,f
    BNZ AGAIN1
    return

    
; one second delay f(Quartz)
SEC_DLY  
    bank0
    IF FOSC == .10000000
	MOVLW 5                 ; 5 x 200mS Q=10MHz
	ENDIF
	IF FOSC == .4000000
	MOVLW 2                 ; 2 x 500mS Q=4MHz
    ENDIF
   	IF FOSC == .2000000
	MOVLW 1                 ; 1 x 1000mS Q=4MHz
    ENDIF
    MOVWF Count,0
T0:  
    MOVLW LOW (.3035)  ; DBh
    MOVWF TMR1L
    MOVLW HIGH (.3035)  ;  0Bh
    MOVWF TMR1H
    BCF PIR1,TMR1IF 
    BSF T1CON,TMR1ON	;START TIMER1
T1:
    BTFSS PIR1, TMR1IF
    BRA T1
    BCF T1CON,TMR1ON    ;SToP TIMER1
    DECF Count,f,0
    BNZ T0
    BCF PIR1,TMR1IF 
    BCF T1CON,TMR1ON	;STOP TIMER
    return		

		
		
		

;---------------- Binary (16-bit) to BCD -----------------------
; 16-bit-Binary  ->  4 digits de 8bits
; ( val1:val1+1) ->  Dixmil , mille , cent , dix , uno 
bcd_temp 
; save value 
        movf val1,W
        movwf valx
        movf val1+1,W
        movwf valx+1
        swapf   val1+1,W 	; HIGH
        andlw   0x0F
        addlw   0xF0
        movwf   mille
        addwf   mille,F
        addlw   0xE2 
        movwf   cent 
        addlw   0x32 
        movwf   uno 
        movf    val1+1,W 
        andlw   0x0F 
        addwf   cent,F 
        addwf   cent,F
        addwf   uno,F 
        addlw   0xE9 
        movwf   dix
        addwf   dix,F
        addwf   dix,F 
        swapf   val1,W 		; LOW
        andlw   0x0F 
        addwf   dix,F 
        addwf   uno,F
        rlcf     dix,F 
        rlcf     uno,F 
        comf    uno,F 
        rlcf     uno,F 
        movf    val1,W 
        andlw   0x0F 
        addwf   uno,F 
        rlcf     mille,F
        movlw   0x07 
        movwf   dixmil
        movlw   0x0A             
Lb1: 
        decf    dix,F 
        addwf   uno,F 
        btfss   STATUS,C 
        bra   Lb1 
Lb2: 
        decf    cent,F
        addwf   dix,F 
        btfss   STATUS,C 
        bra   Lb2 
Lb3: 
        decf    mille,F 
        addwf   cent,F 
        btfss   STATUS,C
        bra   Lb3 
Lb4: 
        decf    dixmil,F 
        addwf   mille,F 
        btfss   STATUS,C 
        bra   Lb4 

	btfss Drapeaux,5    ; 1 => affichage 00000 a 999999
	bra  Bcd_5digits   ; 0 => affichage + ou - XXX.XX

	movlw '+'
	btfsc Drapeaux,7
	movlw '-'
	call Rs_Putchar

	movf   mille,w
	btfss STATUS,Z     ; si digit=0 remplace par Blanc
	bra Lb5

	movlw ' '
	call Rs_Putchar
	bra Lb6
Lb5  
	addlw  '0'
	call Rs_Putchar
Lb6
	movf   cent,w
	addlw  '0'

	call Rs_Putchar
	movf   dix,w
	addlw  '0'
		call Rs_Putchar
	movlw '.'
	call Rs_Putchar
	movf   uno,w
	addlw  '0'
	call Rs_Putchar
	movlw '°'
	call Rs_Putchar
	movlw 'C'
	call Rs_Putchar
	
	bra Bcd_51
	

;---------------
Bcd_5digits
	movf   dixmil,w
	addlw  '0'
	call Rs_Putchar
	movf   mille,w
	addlw  '0'
	call Rs_Putchar
	movf   cent,w
	addlw  '0'
	call Rs_Putchar
	movf   dix,w
	addlw  '0'
	call Rs_Putchar 
	movf   uno,w
	addlw  '0'
	call Rs_Putchar
	movlw	' '
	call Rs_Putchar
Bcd_51
; restitue val1
    movf valx,W
    movwf val1
    movf valx+1,W
    movwf val1+1
   	return

    END
    
Sat Feb 23 16:29:14 2013
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\_Mplab8\_Mesprojets_ASM\_18Fxxxx\18F_NE555_ADC.o".
Clean: Deleted file "C:\_Mplab8\_Mesprojets_ASM\_18Fxxxx\18F_NE555_ADC.err".
Clean: Deleted file "C:\_Mplab8\_Mesprojets_ASM\_18Fxxxx\18F_NE555_ADC.hex".
Clean: Deleted file "C:\_Mplab8\_Mesprojets_ASM\_18Fxxxx\18F_NE555_ADC.lst".
Clean: Deleted file "C:\MPLAB8\_Mesprojets\18F_NE555_ADC.cof".
Clean: Deleted file "C:\MPLAB8\_Mesprojets\18F_NE555_ADC.map".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p18F252 "18F_NE555_ADC.asm" /l"18F_NE555_ADC.lst" /e"18F_NE555_ADC.err"
Warning[219] C:\_MPLAB8\_MESPROJETS_ASM\_18FXXXX\18F_NE555_ADC.ASM 241 : Invalid RAM location specified.
Warning[219] C:\_MPLAB8\_MESPROJETS_ASM\_18FXXXX\18F_NE555_ADC.ASM 242 : Invalid RAM location specified.
Warning[219] C:\_MPLAB8\_MESPROJETS_ASM\_18FXXXX\18F_NE555_ADC.ASM 319 : Invalid RAM location specified.
Warning[219] C:\_MPLAB8\_MESPROJETS_ASM\_18FXXXX\18F_NE555_ADC.ASM 320 : Invalid RAM location specified.
Executing: "C:\Program Files\Microchip\MPASM Suite\mplink.exe" /p18F252 /l"C:\Mplab8\MPASM Suite" "18F_NE555_ADC.o" /z__MPLAB_BUILD=1 /m"C:\MPLAB8\_Mesprojets\18F_NE555_ADC.map" /w /o"C:\MPLAB8\_Mesprojets\18F_NE555_ADC.cof" /x
MPLINK 4.46, Linker
Device Database Version 1.11
Copyright (c) 1998-2011 Microchip Technology Inc.
Errors    : 0

Loaded C:\MPLAB8\_Mesprojets\18F_NE555_ADC.cof.
----------------------------------------------------------------------
Release build of project `C:\_Mplab8\_Mesprojets_ASM\_18Fxxxx\18F225_Tst.mcp' succeeded.
Language tool versions: MPASMWIN.exe v5.48, mplink.exe v4.46, mplib.exe v4.46
Sat Feb 23 16:29:17 2013
----------------------------------------------------------------------
BUILD SUCCEEDED

17:16:05.088> 00040 	00038 	00039 	00039 	00041 	00040 	00040 	00038 	00039 	00039 	00393 + 19.6°C	F=54452 
17:16:06.139> 00040 	00038 	00038 	00039 	00039 	00041 	00040 	00040 	00040 	00038 	00393 + 19.6°C	F=54441 
17:16:07.191> 00038 	00038 	00039 	00037 	00041 	00041 	00041 	00040 	00040 	00040 	00395 + 19.7°C	F=54431 
17:16:08.242> 00041 	00041 	00041 	00041 	00040 	00040 	00040 	00040 	00043 	00040 	00407 + 20.3°C	F=54428 
17:16:09.294> 00040 	00040 	00040 	00040 	00048 	00040 	00038 	00038 	00038 	00038 	00400 + 20.0°C	F=54426 
17:16:10.345> 00039 	00039 	00039 	00039 	00041 	00041 	00041 	00041 	00041 	00039 	00400 + 20.0°C	F=54427 
17:16:11.397> 00039 	00041 	00041 	00041 	00040 	00040 	00040 	00040 	00040 	00040 	00402 + 20.1°C	F=54431 
17:16:12.448> 00041 	00038 	00038 	00039 	00039 	00039 	00041 	00041 	00041 	00040 	00397 + 19.8°C	F=54434 
17:16:13.500> 00040 	00038 	00038 	00038 	00039 	00039 	00041 	00041 	00039 	00040 	00393 + 19.6°C	F=54440 
17:16:14.551> 00040 	00038 	00039 	00039 	00041 	00041 	00040 	00040 	00046 	00038 	00402 + 20.1°C	F=54452 
17:16:15.553> 00041 	00040 	00041 	00038 	00037 	00041 	00040 	00040 	00038 	00038 	00394 + 19.7°C	F=54465 
17:16:16.604> 00038 	00039 	00041 	00040 	00040 	00038 	00039 	00041 	00040 	00042 	00398 + 19.9°C	F=54475 
17:16:17.656> 00039 	00041 	00040 	00038 	00039 	00041 	00040 	00038 	00039 	00040 	00395 + 19.7°C	F=54494 
17:16:18.707> 00040 	00041 	00039 	00041 	00041 	00039 	00041 	00040 	00039 	00041 	00402 + 20.1°C	F=54509 
17:16:19.759> 00040 	00038 	00041 	00040 	00039 	00040 	00039 	00040 	00038 	00041 	00396 + 19.8°C	F=54565 
17:16:20.810> 00039 	00040 	00041 	00038 	00040 	00039 	00038 	00040 	00039 	00042 	00396 + 19.8°C	F=55029 
17:16:21.862> 00039 	00041 	00039 	00041 	00041 	00041 	00041 	00041 	00041 	00039 	00404 + 20.2°C	F=54571 
17:16:22.913> 00039 	00040 	00038 	00039 	00038 	00041 	00039 	00039 	00040 	00039 	00392 + 19.6°C	F=54516 
17:16:23.965> 00040 	00039 	00041 	00041 	00039 	00039 	00040 	00039 	00041 	00040 	00399 + 19.9°C	F=54499 
17:16:25.016>

and you can see TEMP is STABLE , Frequency also OK ..
except i used RS232 instead of LCD...i don't have a free LCD to do it.
 
Last edited:

i have used same power supply for 555 timer as well as for microcontroller this is causing the malfunctioning whole circuit including garbage values displayed on LCD.
I then used different power supply for 555 of 12V so the output waveform may reach upto 4.5V at 36KHz. this was causing disturbance in ADC measured value of controller.
then i used 5V supply for 555 timer this may increase the count per second but rest of the circuit remain stable. the change in measured value was settled by using offset in programming
this solved my problem

thanks alot for everyone for Helping!!!!!!!!
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…