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.

MCP3201 with an offset

Status
Not open for further replies.

atomlcp

Newbie level 4
Joined
Mar 19, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
mcp3201 and 8051

I am facing a problem using the MCD3201 where the output hav an offset to the input. I am using 4.096Vref So far i had check with some reading adn the result are show as below:

INPUT OUTPUT
below 27mv same as input
40mV 41mV
50mV 52mV
60mV 63mV
70mV 74mV
85mV 89mV
100mV 105mV
120mV 126mv
500mV 531mV
1V 1.065V
1.2V 1.275V
2V 2.127
3V 3.19
I have place together with the code dor the MCP3201.

Please help. Desparate

below is the code using 8051


AD:
INIT_AD:
SETB CS
SETB DO
CLR CLK
CLR A
MOV ADH,#00
MOV ADL,#00
AD_START:
CLR CS
NOP
NOP

MOV TIME1,#5D ;300US
MOV TIME2,#6D
MOV TIME3,#6D
CALL DELAY_NS

AD_CON:
SETB CLK
NOP
NOP
CLR CLK
NOP
NOP
SETB CLK
NOP
NOP
CLR CLK
NOP
NOP
SETB CLK
NOP
NOP
CLR CLK
NOP

MOV COUNTER,#4D
AD_BIT_INH:
SETB CLK
NOP
MOV C,DO
RLC A
CLR CLK
DJNZ COUNTER,AD_BIT_INH
ANL A,#00001111B
MOV ADH,A
MOV COUNTER,#8D
AD_BIT_INL:
SETB CLK
NOP
MOV C,DO
RLC A
CLR CLK
DJNZ COUNTER,AD_BIT_INL
MOV ADL,A
SETB CS
NOP
NOP
NOP

MOV TIME1,#10D ;DELAY about 1mS
MOV TIME2,#10D
MOV TIME3,#10D
CALL DELAY_NS
RET
 

mcp3201

For me it looks like you have rather problem with reference voltage.I would make it adjustable, so you can play with some other voltages ..
 

Why is it problem with the reference voltage? 4.096V is an allow value isnt it?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top