can i slowdown owin and owout


Closed Thread
Results 1 to 6 of 6
  1. #1
    Eugen's Avatar
    Eugen Guest

    Default can i slowdown owin and owout

    i have a problem i am using 3 ds18b20 and if i use a 8mhz crystal and use DEFINE OSC 8 it dosent work but if i change DEFINE OSC 8 to DEFINE OSC 16 then it works. can i slow down the owin and owout? i am using 3*15 meter cat5 cabel this is the program or what sould i do?

    DEFINE OSC 8
    ADCON1 = 7
    DEFINE LCD_EREG PORTA
    DEFINE LCD_EBIT 5

    TRISB = %11111111
    TRISC = %11111111

    DQ VAR PortC.0

    Stat VAR BIT
    S1 Var byte
    S2 Var byte
    S3 Var byte
    A VAR WORD
    B VAR WORD

    start:

    S1 = $E5
    S2 = $93
    S3 = $1E
    gosub Temp
    A=B

    S1 = $86
    S2 = $81
    S3 = $7B
    gosub Temp

    A=A >> 3
    B=B >> 3

    Lcdout $fe, 1
    Lcdout dec (A >> 1),".",dec(A.0 * 5)

    Lcdout $fe, $C0
    Lcdout dec (B >> 1),".",dec(B.0 * 5)

    pause 2000
    goto start

    Temp:
    OWOUT DQ, 1, [$55,$28,S1,S2,$79,$00,$00,$00,S3,$44]
    Pause 1000
    OWOUT DQ, 1,[$55,$28,S1,S2,$79,$00,$00,$00,S3,$BE]
    OWIN DQ, 2, [B.LOWBYTE,B.HIGHBYTE]' Read two bytes, then end communications
    Return

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Eugen,

    E>>i have a problem i am using 3 ds18b20 and if i use a 8mhz crystal and use DEFINE OSC 8 it dosent work but if i change DEFINE OSC 8 to DEFINE OSC 16 then it works. can i slow down the owin and owout? i am using 3*15 meter cat5 cabel this is the program or what sould i do?<<

    My knowledge has not been in this area, but one BIG question would rise in my head...

    Baudrate... is the Baudrate accurate and stable at OSC 8 at the speed you are going? OSC 8 may be too slow to use a baud that will produce a guaranteed stable communication. Its like attempting to use 9600 baude with a 4mhz Crystal...Flakey, if not worthless.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Dwayne

    good to see you back on the forum !

    OWIN and OWOUT has nothing to do with Baudrate.

    Eugen

    I think there is only one way to control 1wire comms speed:

    Write your own 1wire routines and don't use OWIN and OWOUT.

    (I had to do this with I2C on one of my projects, but I haven't tried it with 1wire yet)
    Last edited by NavMicroSystems; - 28th January 2005 at 00:13.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  4. #4
    Eugen's Avatar
    Eugen Guest


    Did you find this post helpful? Yes | No

    Default

    I change the pull-up to a smaller then its works

  5. #5
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Eugen,

    what value were you using initially for the pullup and what value are you using now ?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  6. #6
    Eugen's Avatar
    Eugen Guest


    Did you find this post helpful? Yes | No

    Default

    i was using 4.7k and now i use 4.7 and a 10k pot so i dont know what i have now

Similar Threads

  1. Please help with code for DS18B20
    By fratello in forum mel PIC BASIC Pro
    Replies: 109
    Last Post: - 28th April 2013, 21:12
  2. Ds18b20 + 16f628a
    By Max Power in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 16th July 2009, 11:29
  3. DS2438 onewire code sample
    By Captain Stern in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st January 2007, 02:47
  4. Help with DS2436 Voltage monitor
    By vladimir059@hot in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th October 2006, 16:39
  5. Can anyone help at getting OWIn & OWOut to work @ 16MHz?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th January 2006, 11:08

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts