336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Vref : 참조전압 (PIC에서 쓰이는 용어)

Aref : 아날로그 VCC의 기준 전압이 되는 핀입니다. (AVR에서 쓰이는 용어)

AVcc : 아날로그 VCC가 연결되는 핀입니다. (AVR에서 쓰이는 용어)



http://www.microchip.com/forums/m670371.aspx


I'm using a PIC18F45k20
 
If i use the internal Vref's 

then i get  0 = 0V and 1023 = 3.08V  .. as expected

만약 내가 사용했고 the 내부 Vref를

그런다음 내가 얻었다면 0 = 0V일때, and 1023 = 3.08V일때


Now, i want to sense from 0.4V to 2.43V 

so if i set -Vref = 0.40V and +Vref = 2.43V  ( this difference is greater than 2.0V as the datasheet requires )
i get 0 = 0.40V (as expected)  , 1023 = 1.69V  .. WHY IS THIS SO LOW ? , i expect 1023 = 2.43V

이제 난 wanna 감지하길 원한다. 0.4V ~ 2.43V를

그래서 만약 내가 set했으면 -Vref=0.40V로 and +Vref=2.43V로

난 얻는다. 0=0.40V를 (예상대로), 1023=1.69V를 ... 왜 이게 이리 낮지 ?

난 기대했는데 1023=2.43V로



Any suggestions ?


Hi 

  
If you are setting up you references (VRef+ and VRef-) with resistive dividers, be prepared to have some deviations due to the leakege current on the PIC pins. 
Its not much but is something. 

만약 네가 setting up 한다면 네 references를 with 저항 분배기로,

be prepared되라 to 갖기위해 some 일탈들을 due to the 전류누수로인해 on the PIC핀들상에서.

크진않지만 살짝있다.

(전류누수로 인해 정확히 Vref=2.43이 되지 않을 수 있다는 답변)


I would expect 1023 = 2.03V, the difference between VRef+ & VRef-.
To get the Vss referenced voltage then add in the Vref-. 1.69V + 0.4V = 2.09V.
This are still lower than expected. Are your Voltage dividers of a low enough impedance to minimize errors from Vref input leakage? Did you measure the Vref+ & - at the PIC's pins to ensure it is correct?

Is there any ripple on the Vrefs? Try adding a cap on each.



http://www.edaboard.com/thread203325.html

ADC = Vref / 1023 ........in case of 10bit resolution


http://ww1.microchip.com/downloads/en/DeviceDoc/31019a.pdf

The Voltage Reference module is typically used in conjunction with the Comparator module. 

The comparator module’s inputs do not require very large drive, 

and therefore the drive capability of the Voltage Reference is limited. 

비교기 모듈 입력은 요구하지않는다. 매우 큰 드라이브를

따라서 the drive 용량... of the 참조전압의 ...은 제한되있다.

The Voltage Reference is a 16-tap resistor ladder network 

that provides a selectable voltage reference.

The resistor ladder is segmented to provide two ranges of VREF values 

and has a power-down function to conserve power 

when the reference is not being used.

Vref는 16개 수도꼭지 저항 ladder 네트워크로 구성되있다.

that 제공하는 a 선택가능한 Vref를.

저항 사다리는 조각나있다. to 제공하기위해 two 범위들을 of Vref 값들의

and 갖고있다. a 파워다운 기능을 to 보호하기위해 전력을

when the 참조전압이 사용되고있지 않을때.

The VRCON register controls the operation of the reference as shown in Figure 19-1.

The block diagram is given in Figure 19-1. 

Within each range, the 16 steps are monotonic (i.e. each increasing code will result in an increasing output).

▲VREN은 Vref를 Enable 시키기위해 필수로 High 값을 줘야한다.

VR3~VR0 그리고 VRR값이 조합이 되서 Vref 출력 전압이 결정된다.

VREN : Vref Enable

VROE : Vref Output Enable

VRR : Vref Range Selection

1 = 0V to 0.75 VDD, with VDD/24 step size 

0 = 0.25 VDD to 0.75 VDD, with VDD/32 step size

VR3:VR0 : Vref Value Selection (▼출력 계산공식)

When VRR = 1: VREF = (VR<3:0>/ 24) • VDD 

When VRR = 0: VREF = 1/4 * VDD + (VR3:VR0/ 32) • VDD


▼Assembly Code

MOVLW    0x02

MOVWF    CMCON     ;Comparator Control Register

BSF          STATUS,RP0

MOVLW    0x07

MOVWF    TRISA

MOVLW    0xA6

MOVWF    VRCON    ;Vref Control Register

BCF          STATUS,RP0

CALL        DELAY10

Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백