Shop OBEX P1 Docs P2 Docs Learn Events
Help, Crystal issues - Page 2 — Parallax Forums

Help, Crystal issues

2»

Comments

  • steprogsteprog Posts: 227
    edited 2014-03-28 22:31
    right now all I have is just the two outputs being driven hi/lo. I commented out all the objects and use the xtal1 clock. The result is simply an output low with no hi/low response
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-03-28 22:45
    steprog wrote:
    The result is simply an output low with no hi/low response
    Not surprising. I don't see anywhere in your code where you've set dira for those pins.

    -Phil
  • steprogsteprog Posts: 227
    edited 2014-03-28 22:48
    Sorry, I forgot to add this subroutine

    PRI Initialize
    'Initialize

    dira [XB_Sleep] := 0 ' output
    dira [XB_Reset] := 1 '
    dira [FOAM_Pin] := 1 ' output
    dira [MIST_Pin] := 1 ' output

    ' outa [XB_Sleep] := 1 ' If 1 then not sleep
    outa [XB_Reset] := 1 ' If 1 then not reset

    outa [FOAM_Pin] := 0 ' If 1 then MosFet On
    outa [MIST_Pin] := 0 ' If 1 then MosFet On

    ' Set all activation flags to false
    OverPressure:= false
    GoodSwitch:= false
    HiTemp:= false
    Flame:= false
    RfOverPressure:= false
    RfGoodSwitch:= false
    RfHiTemp:= false
    RfFlame:= false
    RfFoam:= false
    FlameTimeout:= false
    FlameCnt:= 0

    'constants for Flame detection ChkFlame

    Upper := 180
    Lower := 50
    MaxThreshold := 220

    'constants for Heat detection ChkTemp
    MaxTherm := 150
    [/code]
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-28 22:49
    Set pins for MosFet Drivers FOAM_Pin = 17
    MIST_Pin = 16


    I would write some extra code with delays at each step to send info to the serial terminal . That way you can step through the code. Are you able to disconnect the Mosfet and use your logic probe on the output pins to see if they still toggle with no load? If not are you able to output to different pins?
  • steprogsteprog Posts: 227
    edited 2014-03-28 22:55
    I am looking at the input of the mosfets, so I think we are good there. I disabled the serial terminal to really simplfy everything and it is on the xtal1 clock so i don't try to use the terminal. Just looking for an oscillating signal with my logic probe
  • steprogsteprog Posts: 227
    edited 2014-03-28 22:56
    I checked 3 boards now with the same program, same result just an output low on the probe
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-28 22:56
    I just loaded up your code to try it and I'll watch for the output on the Oscillscope. :)
  • steprogsteprog Posts: 227
    edited 2014-03-28 23:03
    thanks Bob
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-28 23:06
    I only see it pulsing on one pin 17 but I have to re-check this again.
  • jmgjmg Posts: 15,173
    edited 2014-03-28 23:09
    steprog wrote: »
    I checked 3 boards now with the same program, same result just an output low on the probe

    Do the expected pins change state on release of reset ?
  • steprogsteprog Posts: 227
    edited 2014-03-28 23:16
    I haven't tried to manualy reset yet, how would that changes things you think?
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-28 23:22
    CodeTest1.jpg


    Test1 Screen Shot


    FOAM_Pin = 17
    ' MIST_Pin = 16 ' org
    MIST_Pin = 18

    I had to change one pin to 18 . However, that's probably a pin I killed some other time . It works on 2 pins if I use 17 and 18
    1024 x 768 - 144K
  • steprogsteprog Posts: 227
    edited 2014-03-28 23:28
    Thanks Bob,
    I just tried it on 4 boards and a separate protoboard. nothing just low output. hmm..
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-28 23:33
    Can you switch your output to 2 unusedpins that you can watch with your logic probe? That would tell you that the prop is working. then we could look to see what's keeping the mosfet low.

    What part Number is on the mosfet?
  • steprogsteprog Posts: 227
    edited 2014-03-28 23:35
    Hi Bob,
    I am looking only at the input of the mosfets and on the protoboard just the pins - same result output low
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-28 23:41
    If the prop pin is connected to the MOSFET input , that would be normal. What we are trying to figure out is if you have the correct MOSFET that a propeller pin can switch with the voltage output it has or if something on the MOSFET side is holding everything low.

    Is there anything in between the pop pin and the MOSFET , like another transistor?

    Do you have a volt meter with you?

    Did yo measure the power supply voltages?

    Can you measure the voltages on the MOSFET ie gate , source, drain etc.
  • steprogsteprog Posts: 227
    edited 2014-03-28 23:51
    I had these mosfets being switched already before, the power is good from the volt meter. That is what is so difficult about all of this the hardware did work. Bob your up way past your bedtime :), You did help me by letting me know the algorithm did work. It could be my logic probe isn't really working. Not sure. The mosfets have worked well and already driven loads.
    I built my hardware, had the usb and the xb interface already working all the other sensors were talking. I drove up to Oregon to run an important test sensing and suppressing car fires and the boards I have slowly stopped working. I replaced crystals and processors on a couple no luck, Strange strange problem.
    Greg
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-29 00:06
    Bob your up way past your bedtime

    Yes, unfortunately I will have to go soon and probably without notice. It's 4:05 am LOL

    It's probably one of those things that you will kick your self for later. LOL

    You don't really need the logic probe if you have a meter however, what did you change? something changed? think hard :) Don't assume anything, just double check it all for example:

    Did you pack the correct power sources with enough current? If your using battery's are you sure they charged up and they have enough current?

    That type of analysis.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-29 00:25
    outa [FOAM_Pin] := 0 ' If 1 then MosFet On
    outa [MIST_Pin] := 0 ' If 1 then MosFet On


    outa [FOAM_Pin] := 1 ' If 1 then MosFet On
    outa [MIST_Pin] := 1 ' If 1 then MosFet On

    Try that to see if they switch on.
  • steprogsteprog Posts: 227
    edited 2014-03-29 09:41
    Figured it out thanks everyone, especially you Bob. It was so simple it was stupid. After Bob tried my code and it worked for him and not on any of my boards I realized I must be doing something so fundamentally wrong. So I went and tried to get a real nights sleep and got up ran some hex code and realized that I was not on my top object and was trying to load some older project in my boards. Soo stupid, it has been a long time between projects and I just wasn't thinking. All my boards seem to be working well so far this morning more testing to go, but way passed that craziness. Thanks everyone. Thanks Bob.
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-03-29 09:59
    steprog wrote: »
    ... realized that I was not on my top object and was trying to load some older project in my boards....

    That's interesting because there have been raging debates about that "feature" in the Spin tools. It bites people often. The latest is here.
  • jmgjmg Posts: 15,173
    edited 2014-03-29 16:24
    mindrobots wrote: »
    That's interesting because there have been raging debates about that "feature" in the Spin tools. It bites people often. The latest is here.

    Certainly, well designed tools should make it very clear just exactly what is being downloaded.
    That is also why text editors should show the full file path, (even if via a hint) so it is very clear to users, where they are.
    (where I see this in tools, I get it fixed)
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-03-30 20:50
    Figured it out thanks everyone, especially you Bob

    No problem Greg,

    We knew you would figure it out after a good night's sleep.. I hope your event on Saturday went well. Your project sounded interesting. Maybe you can post some projects pictures sometime. :)

    Bob
  • steprogsteprog Posts: 227
    edited 2014-04-04 21:10
    Hi Bob,
    Sorry for the delayed response. I will get some photos to show, when I get a chance. All worked out, but it was many nights of little or no sleep
Sign In or Register to comment.