Help for Fatigue testing controller - Page 2


Today 12:57
Forum: The Lounge
Starter: Tim
Views: 0
Replies: 11
Today 11:29
Forum: Absolute Beginners Section
Starter: amateurtje
Views: 0
Replies: 8
+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Help for Fatigue testing controller37 days old

  1. #11
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    80
    Thumbs Up
    Received: 81
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    Not working tried many codes but failed.

    Actually i want a set point below 60, when portd.1 is high then i can set between 0 to 60.suppose i set 45 ,then when portd.1=low then it should stop .

    Now intime is actual count when port d.0=0 then count start from 0 and end up at 45.

    When both value are same then a.0 goes high,

    my set value should be in memory on power failures.

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #12
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    80
    Thumbs Up
    Received: 81
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    How to write IF PORTA.0=1 , PORTA.1=1 then PORTC.1=1

    I mean to say that when both portA are high then only portc.1 should high .if any of the port is low then port c.1 should low.
    Last edited by amod; 6th April 2019 at 18:20.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #13
    Junior Member Dave Purola's Avatar
    Join Date
    Jul 2004
    Posts
    42
    Thumbs Up
    Received: 11
    Given: 0
    Total Downloaded
    144.28 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    How about:
    IF (Porta & $03) = $03 then
    Portc.1 = 1
    else
    portc.1 = 0
    endif

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #14
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    80
    Thumbs Up
    Received: 81
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    I wrote

    If portA.0=1 And portA.1=1 then
    Portc.1=1
    Else
    Port.1=0
    Endif

    It is working.
    Is this way is right of doing this?

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #15
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    444
    Thumbs Up
    Received: 33
    Given: 7
    Total Downloaded
    2.43 GB

    1 Not allowed!

    Default Re: Help for Fatigue testing controller

    Quote Originally Posted by amod View Post
    Not working tried many codes but failed.

    Actually i want a set point below 60, when portd.1 is high then i can set between 0 to 60.suppose i set 45 ,then when portd.1=low then it should stop .

    Now intime is actual count when port d.0=0 then count start from 0 and end up at 45.

    When both value are same then a.0 goes high,

    my set value should be in memory on power failures.
    This may do what you want, if not then I am out of ideas/unable to understand what it is you want to do as initially it sounded like you want in increment both inset and intime as a count and now it looks like you just want to set inset and increment intime.
    Code:
    'Set inset value for comparison to intime value
    If PortD.1=1 then inset = Name_Of_Variable_Holding_Limit_Value   'Value could be read into inset here or code that gets the value can be called from here i.e. If PortD.1=1 then gosub to code that sets inset value
    
    'Incremernt intime and set PortA output upon a match with inset
    While PortD.0=0
       Repeat   'Increment intime once per second while PortD.0 is Low and intime < inset
         DelayMs 1000   '1 Second delay 
         inc intime
       until intime = inset
    
       PortA.0 = 1  'Set PortA.0 High when PortD.0=0 and inset = intime 
    Wend

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #16
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    80
    Thumbs Up
    Received: 81
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    what is wrong with my code,all leds on PORTA lights up.

    Device = 16F877A
    Xtal = 16
    Include "MODEDEFS.BAS"
    All_Digital = True


    Output PORTA.0
    Output PORTA.1
    Output PORTA.2
    Output PORTA.3
    Output PORTA.4
    Output PORTA.5
    Output PORTE.0
    Input PORTB.0
    Input PORTD.7
    Input PORTD.6
    Input PORTD.5







    main:




    If PORTB.0=0 Then
    PORTA.0=0
    PORTA.1=0
    PORTA.2=0
    Else
    PORTA.0=1
    PORTA.1=1
    PORTA.2=1
    EndIf

    GoTo main

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #17
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,992
    Thumbs Up
    Received: 185
    Given: 169
    Total Downloaded
    3.69 GB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    Can't say for sure that this is your problem but you could think about read modify write. If its absolutly essencial that you write individually to a bunch of bits on the same port either use LAT or bung in a few NOPs.
    George.

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #18
    Junior Member Dave Purola's Avatar
    Join Date
    Jul 2004
    Posts
    42
    Thumbs Up
    Received: 11
    Given: 0
    Total Downloaded
    144.28 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    Aren't the statements you are sending the port just setting the direction register?

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #19
    Administrator John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,637
    Thumbs Up
    Received: 119
    Given: 31
    Total Downloaded
    3.23 GB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    With your hardware connection is the other side of your LEDs going via a resistor to ground or to +5V ?
    John

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  19. #20
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    80
    Thumbs Up
    Received: 81
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Help for Fatigue testing controller

    Quote Originally Posted by John Drew View Post
    With your hardware connection is the other side of your LEDs going via a resistor to ground or to +5V ?
    John
    Resistor to +5v

  20. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Testing Bits of a register.
    By pic-ignorant in forum The Lounge
    Replies: 2
    Last Post: 16th May 2017, 17:36
  2. Any in the mood to do some beta-testing?
    By hadv215 in forum hadv215's Feedback Forum
    Replies: 0
    Last Post: 14th December 2016, 12:50
  3. CE Marking / Mains Testing
    By rpm26 in forum The Lounge
    Replies: 4
    Last Post: 9th February 2013, 16:45
  4. Debugging/Testing/Emulating
    By t0pP8uZz in forum Proton Plus Compiler v3
    Replies: 6
    Last Post: 5th November 2009, 20:23
  5. PCB Trace Testing
    By ohararp in forum The Lounge
    Replies: 1
    Last Post: 20th November 2007, 18:04

Posting Permissions

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