PDA

View Full Version : wired world



jcleaver
- 5th February 2007, 17:07
just a comment this forum is very usefull however it could be great if
getting actual hook up diagrams values was not like pulling teeth i know some of the information is availabe in the listing but this is hard search for those of us that are into the actual connections diagrams

example using the ds1821 there is a couple of listings and some mention of the correct pullup but no diagrams \

believe this could go a long way for help
just a beginners thought
do appreicate the help

Archangel
- 6th February 2007, 00:32
some mention of the correct pullup but no diagrams \

believe this could go a long way for help



Well at the risk of sounding harsh, " PULLUP " Pulls UP, up to where? To the supply voltage. PULLDOWN pulls Down to Ground. There now you have a schematic. NOW, as to the value of those pullups. It depends upon what voltage you are using, what you want it to be, and how much current you want them to draw. OHMs law involved here. imagine an LED in series with a resistor.
one end is hooked to power + the other hooked to ground. We will call the resistor Rs. If you have a supply of 5 volts and an LED operating on 1.5 volts and the LED specs call for 20ma then: Rs = Vin - V led / I led or Rs = ( 5 - 1.5) / .02, or Rs = 175. General rules of thumb apply, many people use 10K resistors as port pullups a load of .0005 amp at 5 volts.

jcleaver
- 6th February 2007, 01:34
thanks for your responce
don't know whas occuring
but unable to get expected readings showing 213 c ds1821 using any of the programs above
thought it might have something to do with pullups usinga4.7 to vdd

jcleaver
- 6th February 2007, 01:47
i seem to be confused (not something new)
must have posted in wrong spot trying to use a ds1821
with a 877a and a osc of 20 did a search of this temp sensor
and there were a couple of examples tried them and one show no ds1820
the other gives poor reading 96 deg c or something else
am using a 4.7k res to vss
any help
sorry about the misplaced posting

Archangel
- 6th February 2007, 06:27
I do not know, you might look at this thread, it looks like he is doing the same thing, as you.

jcleaver
- 6th February 2007, 13:12
dont see the thread your talking about

jcleaver
- 6th February 2007, 15:45
wrong place for this
however i am having problems with a dallas ds1821 temperature sensor
connected to a 16f877a pin rc2 with a 4.7 k pullup and running at 20 mhz
it is working but readings are incorrect fairly sure i am communicating

listing

A
'display message on the 2 X 16 character LCD using pic16f84a and DS1820
@ DEVICE pic16f877a, HS_OSC, WDT_ON, PWRT_ON, LVP_OFF, PROTECT_OFF

' Define LCD registers and bits
Define LCD_DREG PORTB ' Port for LCD Data
Define LCD_DBIT 4 ' Use upper 4 bits of Port
Define LCD_RSREG PORTB ' Port for RegisterSelect (RS) bit
Define LCD_RSBIT 3 ' Port Pin for RS bit
Define LCD_EREG PORTB ' Port for Enable (E) bit
Define LCD_EBIT 2 ' Port Pin for E bit
Define LCB_BITS 4 ' Using 4-bit bus
Define LCD_LINES 2 ' Using 2 line Display
Define LCD_COMMANDUS 2000 ' Command Delay (uS)
Define LCD_DATAUS 50 ' Data Delay (uS)

define loader_used 1

DEFINE OSC 20

symbol DQ = PORTC.2
temp var word
cou var byte
cou1 var byte
pause 100
main:
owout DQ, 1,[$CC, $44]
owin DQ, 4,[cou]
if cou = 0 then
owout DQ, 1, [$cc, $BE]
owin DQ, 0,[temp.lowbyte, temp.highbyte, skip 4, cou,cou1]
endif

temp = (((temp >> 1) * 100) - 25 ) + (((cou - cou1) * 100) / cou)
lcdout $fe,1," Environment Tempera"
lcdout $fe, $c0, dec (temp / 100), " . " , dec temp, " C"
pause 1000
lcdout $fe,1
pause 2000

lcdout $fe, $c0, dec (temp / 100), " . " , dec temp, " C"
pause 1000
goto main
end

can someone check this thanks

jcleaver
- 6th February 2007, 16:23
update tried several programs for this chip

however none work ?
does the owin and owout require changes for 20 mhz
it the only thing i seem to have different
other than using a loader

help?!