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.
I tested this part of code in Bascom simulator and it works (giving me correct results for running average)..
In Proteus simulation and in reality it gives me totally incorrect results:roll:
It seems to me that mcu does not remember elements of array after first average?:idea:
Hi, I need help for my code. Im trying to do filtering (running average from circular buffer) from adc reading.
I wrote this code and tested it from bascom 8051 compiler and it works fine :
**circular buffer**
Dim array(3) As Byte
Dim P As Byte
Dim sum As Byte
Dim X As Byte
Dim counter As...
What print option should I use (mirror,not mirror) for making PCB single layer using photo etching method?
for example :
- components are on top silk
- blue layer is bottom copper
Options:
Thanks all for response
Power supply (usb) gives me 4.93~4.94V , 10mV up/down
Vref is now (with 1uF capacitor, i dont know type; I think is film capacitor ID:1uJ63) about 1mV up/down
- - - Updated - - -
I did now:thumbsup:
- - - Updated - - -
What can I still do?
1.) switch elements from...
You are correct as always, about 2~5mV unstable Vref.:thumbsup:
Im using Vref IC MCP1541 https://www.microchip.com/wwwproducts/en/MCP1541 and carbon resistors for voltage divider (33k + 10k) with 5%tolerance. According to datasheet figure 2-10, I should look for output current closer to 0 mA...
Hi and thanks.
I make mistake with capacitance near Vref, added just 0.1uF , with 1uF and specially 10uF I have much better results.
I have unstable Vref (about 0.005mV up/down) what is give me rapidly changing of the last digit value.
The problem can be in voltage divider and breadboard...
Vref current is about 0.2mA which should be fine?
Im using IC Vref and decreasing Vref with voltage divider and of course 1uF capacitor on Vref.
Low ohmic resistors?:?:
Why?
Usual value is an option, you just should not exceed min max value of Vref.
Im using simple voltage divider and voltage is stable.
- - - Updated - - -
I know, but according to datasheet curves I should expect less LSB error.. Even if you sum all the errors for Vref 1V it should be...
Hi,
can someone explain me relation between Vref vs LSB error cause Im a bit confused with datasheet of ADC.
Im using LM35 sensor for temperature measuring and ADC MCP 3004 for analog-digital conversion.
-------------
Vdd is 5V.
- if I use Vref = 5V then I dont have problems with LSB error...
Bump, nobody?
How can I know when registers TH0 and TL0 overflows?
There is in C language statement TF (TF=1,overflow occurred) but I can not find it in Bascom.
I need help for this code. It is coded in Bascom program language.
I wanted to create function for delay using timer0. The problem is that this code executes
only "second delay" (5ms).
Where is problem in code:idea:
Led1 Alias P1.0 ' Led1 alias connected to pin P1.0...
Many thanks ,you were absolutely right!:thumbsup:
Now I have problem how to reduce brightness:lol:
I should put back 330 Ohms on segments.. Are all others values in circuit good (10k for PNP base, 2.2k NPN base)?
A/D connected (from P1.4 to P1.7 ) and LM 35
Im using AT89S51
"Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can
sink/source four TTL inputs."
It works on BreadBoard...
What do you suggest?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.