Jump to content
43oh

amykyta3

Members
  • Content Count

    4
  • Joined

  • Last visited

Reputation Activity

  1. Like
    amykyta3 got a reaction from larsie in Cheap circuit for powering MSP430 from 230V   
    Its isolated enough to be safe. With both hot and neutral wires having a cap on them, it allows the circuit's DC component to float to match the chassis/person handling it. As long as the capacitors are small, they will not be able to transmit enough AC current through them to be able to do any damage. In fact, I'm quite sure the little USB wall-plug adapters for your cell phone use capacitive coupling the same way.
    The forum you linked did bring up a few good points, although a little bit of an overreaction. Probably want some higher-rated capacitors on the mains end. Also, the linked PDF does a nice job explaining the concepts. Either way, If you end up doing a transformerless design I'd still recommend using caps on both Hot and Neutral lines. Never assume that neutral is actually neutral. Always assume that a bad electrician/cocky homeowner will muck this up and then you'll have "ground" be at 230 VAC in relation with the real ground.
  2. Like
    amykyta3 got a reaction from RobG in Cheap circuit for powering MSP430 from 230V   
    Its isolated enough to be safe. With both hot and neutral wires having a cap on them, it allows the circuit's DC component to float to match the chassis/person handling it. As long as the capacitors are small, they will not be able to transmit enough AC current through them to be able to do any damage. In fact, I'm quite sure the little USB wall-plug adapters for your cell phone use capacitive coupling the same way.
    The forum you linked did bring up a few good points, although a little bit of an overreaction. Probably want some higher-rated capacitors on the mains end. Also, the linked PDF does a nice job explaining the concepts. Either way, If you end up doing a transformerless design I'd still recommend using caps on both Hot and Neutral lines. Never assume that neutral is actually neutral. Always assume that a bad electrician/cocky homeowner will muck this up and then you'll have "ground" be at 230 VAC in relation with the real ground.
  3. Like
    amykyta3 got a reaction from larsie in Cheap circuit for powering MSP430 from 230V   
    @nuetron: Close, but that design will vary depending on the load.
    I would've linked you directly but this is a new account so I can't post URLs. Do a google search for "Make a Transformerless Power Supply - Bright Hub". It should be the top result.
     
    The last one on that page is the best since it electrically isolates the circuit from the mains. This one produces 12v that is somewhat regulated by the zener diode. I would then put a typical 3.3v linear regulator at the end to power the msp430.
  4. Like
    amykyta3 got a reaction from oPossum in Detecting if compiler uses CALLA vs CALL instruction   
    I am optimizing some code and I want to have a C function call an ASM function. (no problem here). Problem is that depending on compilation settings, the ASM function will be called using either a CALL instruction or CALLA. Is there any way to detect this at compile-time in a header file or similar so that the ASM function can have a matching RET or RETA instruction. Any mismatch would surely blow up the stack. I would like to make the code as portable as possible and work for any device.
     
    The MSP430X devices have #defines in the header such as __MSP430_HAS_MSP430XV2_CPU__ which indicate the extended instruction set. Unfortunately this does not necessarily mean that a CALLA will be used at compile time since the user could override the compiler to only use 16-bit calls.
     
    Any ideas?
     
    EDIT: Using CCSv5. But if anyone knows of how to do this with MSPGCC I'd also be interested
×
×
  • Create New...