Shop OBEX P1 Docs P2 Docs Learn Events
Brown out issues persist eve nwith new prop , what am I doing wrong — Parallax Forums

Brown out issues persist eve nwith new prop , what am I doing wrong

JetManJetMan Posts: 39
edited 2010-04-15 15:53 in Propeller 1
Last week I had started a thread entitled new guy is lost , I was having issues as to where every time I sent a very simple program to the chip it would execute a quick pulse output on whatever pins I specified and then halt. This was originally in a breadboard circuit design that I had made to control a jet engine and contained numerous components. Yet the program I had written was to simply turn on p12 and p14 indefinitely and that's it , I also wrote a program to toggle these two pins every second or so using the rcfast clock speed . Since then I had ordered a new prop under suspicion that maybe I had a bad ic . now I have made a simple circuit on a solder-less board with nothing but two led's tied to these pins , a 4mhz resonator (3-pin) and a very simple power delivery circuit using a fixed 3.3vdc regulator with all of the necessary caps. Still having the exact SAME behavior . I've tried both chips , I've used the 4mhz osc. and not used the 4mhz osc. when using the osc. i get nothing at all , when using the rcfast mode i at least get a quick blink on the led's. this is becoming very frustrating as I have gone through all of the basic steps of trouble shooting and have hooked my oscilloscope up to the 3.3vdc to make sure no weird noise was present . I have even attempted to power the circuit from a battery to eliminate any strange noise from my bench to power supply.

Being somewhat new to this forum I don't know how often the Parallax folks get involved in discussions although I had many a well seasoned vets respond to my last post with good suggestions.

Below are the several different bits of code I have tried to use with no luck.

'
'
CON
    
  _clkmode = RCFAST 
  


PUB MotorOnOff

  dira[noparse][[/noparse]14..12] := 111 


   repeat 

      outa[noparse][[/noparse]14..12] := 111
      waitcnt (clkfreq/2 + cnt)
      outa[noparse][[/noparse]14..12] := 000




Second rendition


'
'
CON

  _clkmode = RCFAST 
  


PUB MotorOnOff

  dira[noparse][[/noparse]14..12] := 111 


   repeat 

      !outa[noparse][[/noparse]14..12] 
      waitcnt (clkfreq/2 + cnt)





number 3

[noparse][[/noparse]code]

'
'
CON

_xinfreq = 4_000_000
_clkmode = xtal1 + pll16x

PUB MotorOnOff

dira[noparse][[/noparse]14..12] := 111


repeat

!outa[noparse][[/noparse]14..12]
waitcnt (clkfreq/2 + cnt)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Landon Leigh
«1

Comments

  • JetManJetMan Posts: 39
    edited 2010-04-14 17:44
    number 3

    
    '
    '
    CON
         
      _xinfreq = 4_000_000                      
      _clkmode = xtal1 + pll16x
    
    PUB MotorOnOff
    
      dira[noparse][[/noparse]14..12] := 111 
    
    
       repeat 
    
          !outa[noparse][[/noparse]14..12] 
          waitcnt (clkfreq/2 + cnt)
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • LeonLeon Posts: 7,620
    edited 2010-04-14 17:45
    Schematic?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-14 17:51
    There is nothing wrong with the code you've shown. You must have a hardware issue. You haven't mentioned about other connections to the Propeller chip, specifically BOEn and whether you've properly bypassed the Vdd/Vss pins on the device. How do you have the PC connected? All of these things are important and, if done improperly, could result in the behavior you describe. A real schematic, even hand drawn and scanned in would be helpful.
  • JetManJetMan Posts: 39
    edited 2010-04-14 18:08
    Schematic

    Sorry had to draw quick ,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
    Prop.bmp 385.1K
  • LeonLeon Posts: 7,620
    edited 2010-04-14 18:11
    BOEn shouldn't be floating. Connect it to Vss.

    See the data sheet for the LM1094: you are using the wrong capacitors. 10 uF tantalums are specified.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 4/14/2010 6:19:16 PM GMT
  • JetManJetMan Posts: 39
    edited 2010-04-14 18:14
    It's not floating it is tied to VSS I'm uploading a bettter schematic now with better definition of conections

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-14 18:14
    Either you've got the drawing wrong or the way you've wired the BOEn pin is wrong. BOEn needs to be connected to Vss in most cases. The 0.1uF capacitor needs to be attached between Vdd and Vss on the left side, not Vdd and BOEn.
  • JetManJetMan Posts: 39
    edited 2010-04-14 18:35
    It is connected corectly and has been , the drawing is poor . This is a revised copy showing more emphasis on lesser obvious connection points .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
    1468 x 1109 - 65K
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-04-14 18:45
    You do not need caps on the Xtal, the Prop takes care of that.

    Are you sure that it is brown outs that are causing you grief? If you tie BoE to VDD instead then it will disable the detection, you will need a 10K (or so) pull up on the RST pin though.

    The serial cct could be reseting when you do not want it to, disconnect that to see.

    I get spurious resets from switching on/off my 'scope, but only if the serial lead is in. The earth connection is enough.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • hover1hover1 Posts: 1,929
    edited 2010-04-14 18:46
    Is the resonator physically connected when you run the RCFAST code?
  • JetManJetMan Posts: 39
    edited 2010-04-14 18:53
    Ok ___


    The crystal is actually a 4mhz 3 pin resonator from parallax , I just didn't have that symbol in my software so i dropped in the prefab crystal with caps. Sp there a re no caps just resonator and ground connection . Believe you me I have tried the basics of disconnecting the serial cable and all that jazz , tried it on the UPS and with out . Tried it with a toroidal power filter transformer and without . tried it on battery only with the laptop and the circuit and every other permutation.


    I have tried disabling the boe but didn't realize i needed a pull up on the rst pin so it wouldn't connect. I'll try that now.



    hover - I tried many times without the resonator as it just arrived this afternoon , then I have now tried it with the resonator and it gets worse , with the resonator attached and programmed i get no response , without it I at least get a quick pulse.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • JetManJetMan Posts: 39
    edited 2010-04-14 19:00
    Still the same , I have put a 10k pull-up on rst and connected boen to 3.3vdc with the same results as before : One quick pulse on the output pins and then nothing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • hover1hover1 Posts: 1,929
    edited 2010-04-14 19:00
    Not sure why you went with the resonator. The 5.0 MHz or 6.25 MHz Xtal would have been.20-.30 more and is proven in Propeller design. Never heard of anyone using a resonator.

    Jim
    JetMan said...
    Ok ___


    The crystal is actually a 4mhz 3 pin resonator from parallax , I just didn't have that symbol in my software so i dropped in the prefab crystal with caps. Sp there a re no caps just resonator and ground connection . Believe you me I have tried the basics of disconnecting the serial cable and all that jazz , tried it on the UPS and with out . Tried it with a toroidal power filter transformer and without . tried it on battery only with the laptop and the circuit and every other permutation.


    I have tried disabling the boe but didn't realize i needed a pull up on the rst pin so it wouldn't connect. I'll try that now.



    hover - I tried many times without the resonator as it just arrived this afternoon , then I have now tried it with the resonator and it gets worse , with the resonator attached and programmed i get no response , without it I at least get a quick pulse.

  • hover1hover1 Posts: 1,929
    edited 2010-04-14 19:05
    Well, the codes are correct. Verified on Parallax Demo Board outputting to LED's on 18..16. Got to be hardware. I'm stumped!
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-14 19:06
    Your schematic now appears correct. Your code appears correct. There's no particular reason from what you've described that the whole thing shouldn't work just fine, but it doesn't. Therefore, there's something different about what you actually have from what you've described. Given that you've tried the whole thing on a battery (3.0V) and it behaved the same suggests that the power source is not a likely source of the behavior. Maybe the breadboard is bad? This has happened before.
  • JetManJetMan Posts: 39
    edited 2010-04-14 19:06
    That seems fairly irrelevant though ? I have been attempting to make this thing work for a week now and just ordered the resonator to try it and see if that resolved any issues. More so I hadn't noticed the 5mhz and 6.25mhz crystals on the web site and so I ordered the resonator. Either way the Smile doesn't work , when ever it can be made to work in rcfast mode then I will gladly order a 5mhz crystal and attach it directly to the ic as shown on the demo board schematic. Until then I feel it's really a moot point .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • JetManJetMan Posts: 39
    edited 2010-04-14 19:08
    Mike it certainly is starting to look that way but , I have two chips now . One is on the solder-less board with bare bones as shown in the schematic i uploaded and the other is on my actual circuit and both behave the same way.

    I'm at a total loss ?!?!?!?!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-14 19:18
    I think you've reached well past the point where a telephone call to Parallax Tech Support would be best. There's only so much that can be solved using this written exchange.
  • JetManJetMan Posts: 39
    edited 2010-04-14 20:41
    Thanks to support we found the issue , seems my dtr pin on my com port is sending two pulses during programming so it was resetting the chip before it could fully execute the program .

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • JetManJetMan Posts: 39
    edited 2010-04-14 20:50
    Scratch all that !!! It was the damn 0.1uf cap that Parallax shows between the DTR pin and the npn transistor for the RSTn pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • hover1hover1 Posts: 1,929
    edited 2010-04-14 21:00
    Glad you got it working.

    My Parallax schematic shows a 10nf there. Not sure if that makes a difference.

    Jim
    JetMan said...
    Scratch all that !!! It was the damn 0.1uf cap that Parallax shows between the DTR pin and the npn transistor for the RSTn pin.

    763 x 645 - 171K
  • hover1hover1 Posts: 1,929
    edited 2010-04-14 21:03
    Which document? We should get it updated if it is wrong.

    Jim
    JetMan said...
    Scratch all that !!! It was the damn 0.1uf cap that Parallax shows between the DTR pin and the npn transistor for the RSTn pin.

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-04-14 23:04
    Did anyone mention the % symbol to indicate binary?


    dira[noparse][[/noparse]14..12] := %111

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • W9GFOW9GFO Posts: 4,010
    edited 2010-04-15 01:02
    Peter Jakacki said...
    Did anyone mention the % symbol to indicate binary?


    dira[noparse][[/noparse]14..12] := %111

    Heh, it still works. 111 in binary is 110_1111.

    Rich H

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Simple Servo Tester, a kit from Gadget Gangster.
  • JetManJetMan Posts: 39
    edited 2010-04-15 04:02
    Hover 1-

    Attached is the document showing the .1uf , tech support mentioned that sometimes it causes issues . I don't know why it is there as I am no that well versed in circuit design. Maybe it should be omitted from the document altogether ?

    Now it's on to new issues smile.gif : The prop is functioning correctly as of now , but I noticed it is very susceptible to induced noise , more so than previous micros I've worked with.

    I have two Very Large DC motors and an ignition coil that are all part of the functional schematic and the coil , when active immediately resets the chip. On occasion the emf from the motors starting and stopping cause enough interference to reset it as well.

    Keep in mind:

    1.) All inductive loads are powered from a separate power source entirely , which shares a common ground with the logic level supply.

    2.) All devices are controlled through opto's which in turn eventually drive power transistors or mosfets.

    3.) Prop has 0.1uf caps strapping both sets of power pins

    4.) 3 qty. internal voltage reg's (12vdc, 5vdc, 3.3vdc) have 1000uf filter caps and 0.1uf noise suppression caps strapped .

    I'm not really sure what else to do at this point to suppress the noise induction ?
    Not that it is needed but I have hooked up the scope to the 3.3vdc power rail and there are definitely distinct noise patterns showing up for each device.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-04-15 04:36
    So you've gone from having trouble with a blinky led to pounding motors and ignition coils! Could you be asking for trouble? I hope you still don't have the serial programming cable plugged in while you are testing as the cable is designed to reset the Prop on what is essentially "noise" on the DTR line.

    Perhaps if you opened up and posted a picture and schematics rather then trying to dole out the information a morsel at a time then you might get some real help.

    1) sounds good but the manner in which the grounds are connected is important too
    2) Overkill perhaps but no problem there. I drive very heavy inductive loads without this isolation.
    3) The caps should be as close to the power pins as possible.
    4) 1000uF is fine on the inputs but the outputs should really have something like 10uF tantalums for better response on momentary surges. Charging a 1000uf on startup leads to unregulated ramping plus if the regulator can't supply the peak currents then it won't be regulating as the cap is discharging. The 10uF is really to improve the load transient response of the regulator.

    Is this an actual PCB with ground plane/pour or just a breadboard?

    Beware the test instrument! What you see may be due to how the scope is hooked up. Ideally you would have a totally floating scope to test for noise but unfortunately many can create "noise" through earth loops.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-04-15 14:53
    You keep calling it a 0.1uF capacitor.· It is a 0.01uF capacitor.·

    It makes a freaking difference!

    It's not the Propeller, it's not Parallax, it's you, man.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2010-04-15 15:00
    JetMan,

    Just to be clear, that capacitor in the schematic you posted is a 0.01uF and not a 0.1uF.

    The circuit was 'lifted' from the front end of our BS2 product line and has withstood the test of time in that respect, so any real problems with that particular circuit would have shown up a long time ago.

    If you are truly seeing noise on the power rail (even though isolated with the exception of ground) then a diode capacitor filter before and after your regulators would help to filter that out.

    Diode/capacitor regulator filter

    ...but I suspect, your 'resets' are coming from having the serial cable plugged in while you are testing. The cable itself, or any length of wire for that matter, will act as an antenna and become susceptible to any external RF noise. You might be able to 'harden' the ability for the Propeller to reset by connecting an external pullup resistor between the RESn and VDD. The exact value is uncertain without testing, but too LOW of a value and the reset circuit wont be able to reset the Propeller. Too HIGH of a value and there is little to no effect from what you are observing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • JetManJetMan Posts: 39
    edited 2010-04-15 15:15
    Beau -

    Yeah , the 0.1uf was my clerical error , the cap I had in circuit was a .01uf but has since been removed. This has helped as before I could not get a download to complete without the chip immediately resetting.

    I currently have caps as noted installed on all three regulator circuits yet I have no diodes so that I'll have to try.

    I am aware of the random resets that may occur from leaving the download cable attached but these happen without the cable attached and at random. I do have a 10k pull-up on the reset line but as you said there are limitations on how LOW I can go there so I suppose I must look a little closer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Landon Leigh
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-04-15 15:27
    With the high speed, high impedance CMOS there is always a risk of spurious problems. How about trying a sheet of metal/foil (connected to GND), insulated, beneath the isolalated board. I had some problems on AVRs with unconncted pins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
Sign In or Register to comment.