Problem Keeping PORTD.1 LOW


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 40 of 49
  1. #1

    Question Problem Keeping PORTD.1 LOW

    Hi Picers

    I am designing a project to switch my circuit on with a membrane keypad using a MAX1672 (see attached drawing) with a PIC16F877 @ 20MHz.

    The ONB Pin on the MAX1672, is by default HIGH, to keep the circuit off, if I press the ON button on my keypad it should switch it ON and then in my code I would put PORTD.1 LOW to keep it on, but this does not work.
    When I press the ON button it switch the circuit on, but when I release the button it switch it off again, so my PORTD.1 is not kept LOW.

    I have asked someone on the microchip mailing list if this is a bug, and this is what he has said:

    <hr>
    <i>
    No, it's not a bug. Read-modify-write is just how the chip works:

    When you do a BSF 0x30, 3 the chip does like this:

    1) Read the value at register 0x30 in the ALU.
    2) Change the value of bit 3 (set)
    3) write back the modified value to register 0x30.

    But when a read of a port register takes place, the pin voltage is read, instead of the internal value written to the port. If you have a pullup on the pin, and set it LOW, when you read the pin's value you will get HIGH, because the pullup resistor is forcing it HIGH.

    So, for BSF PORTD,3, the chip does like this:

    A) Read the pins of PORTD in the ALU;
    B) Modify the value of bit 3 (set)
    C) Write back the modified value to register 0x30.

    See? you need to buffer to avoid reading the pins in a r-m-w.

    Eventually they changed the PORT circuitry in the 16bits PICs, to include another register, called LATD, which does the same thing as our PORTD_BUFFER above.
    </i>
    <hr>

    Is there a solution for this in PICBASIC?
    Attached Images Attached Images  
    Last edited by koossa; - 31st August 2005 at 18:22.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Have to tried switching a transistor which switches on the MAX1672? The IO might be getting too loaded.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    It would help if you posted your code. This doesn't sound like a read-modify-write problem.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I have made quite a lot of changes in my code to see if I can get it to work, so there might be some things that's not supposed to be there:

    <hr>
    &nbsp;&nbsp;INCLUDE "modedefs.bas" 'Standard Include for some variables.
    &nbsp;&nbsp;DEFINE OSC 20 'Oscilator speed.

    &nbsp;&nbsp;Symbol SO = PortA.0 ' Serial Out

    &nbsp;&nbsp;Key_Col Var BYTE ' Keypad column.
    &nbsp;&nbsp;Key_Row Var BYTE ' Keypad row.
    &nbsp;&nbsp;Key_Val Var BYTE ' Key value.
    &nbsp;&nbsp;sKey Var BYTE ' Key String Value.
    &nbsp;&nbsp;SWITCHPIN VAR PORTD.1

    Main:
    &nbsp;&nbsp;ADCON1 = 7 ' PortA = digital I/O
    &nbsp;&nbsp;OPTION_REG.7 = 0 ' Enable PORTB pull-ups
    &nbsp;&nbsp;PORTD = %01000000
    &nbsp;&nbsp;TRISD = %10000000 ' Set Pin to Output
    &nbsp;&nbsp;LOW SWITCHPIN

    checkKeyDown:
    &nbsp;&nbsp;PAUSE 50 ' Debounce key-input
    WaitForKeysUp: ' Wait for all keys up
    &nbsp;&nbsp;PORTB = $f ' All output-pins high
    &nbsp;&nbsp;PAUSE 50 ' Debounce key-input
    checkKeyPress: ' Wait for keypress
    &nbsp;&nbsp;FOR Key_Row = 0 TO 3 ' 4 rows in keypad
    &nbsp;&nbsp;&nbsp;&nbsp;PORTB = $f ' All output-pins high
    &nbsp;&nbsp;&nbsp;&nbsp;TRISB = (DCD Key_Row) ^ $ff ' Set one row pin to output
    &nbsp;&nbsp;&nbsp;&nbsp;Key_Col = PORTB >> 4 ' Read columns
    &nbsp;&nbsp;&nbsp;&nbsp;IF Key_Col != 0 THEN ' If any keydown, exit
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key_Val = (Key_Row * 4) + (NCD (Key_Col ^ 0))
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOOKUP Key_Val,[" 147S<ORE369.2580"],sKey
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serout SO, N9600, [#Key_Val] ' Send Character
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goto checkKeyDown
    &nbsp;&nbsp;&nbsp;&nbsp;endif
    &nbsp;&nbsp;NEXT Key_Row
    &nbsp;&nbsp;GOTO checkKeyPress
    End
    <hr>

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi koossa.

    That guy's explaination doesn't make much sense. If you're holding the ON button, the pin is being held low. &nbsp;How is the Pull-Up resistor going to cause a problem with R-M-W. The Pin will be set low in the program long before the button is released.

    How are you setting the output?

    LOW PORTD.1
    -or-
    PORTD.1 = 0

    If it's the second one. Are you also setting the appropriate TRIS bit?

    TRISD.1 = 0 ' Set PORTD.1 to output
    -or-
    OUTPUT PORTD.1
    <br>
    oops, caught you in the middle of posting. I'll take abother look.
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default

    I'm using LOW PORTD.1

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    After power up, the pin gets set low, and then immidiately it starts scanning the keypad. With your finger still on the button, you now have a dead short from the 5v being output on PORTB to the 0v being output on PORTD.1.

    This will probably cause the MAX1672 to shut-down. Or to oscillate between on and off untill you release the button.
    <br>

    Maybe not, I see that 2k resistor now. rats.
    Last edited by Darrel Taylor; - 31st August 2005 at 19:37.
    DT

  8. #8


    Did you find this post helpful? Yes | No

    Question

    The following code Keep my Portd.1 High
    <HR>
    <p>&nbsp;&nbsp;&nbsp; INCLUDE &quot;modedefs.bas&quot; 'Standard Include for some
    variables.<br>
    &nbsp;&nbsp;&nbsp; DEFINE OSC 20 'Oscilator speed. <br>
    <br>
    &nbsp;&nbsp;&nbsp; Symbol SO = PortA.0 ' Serial Out<br>
    <br>
    &nbsp;&nbsp;&nbsp; Key_Col Var BYTE ' Keypad column.<br>
    &nbsp;&nbsp;&nbsp; Key_Row Var BYTE ' Keypad row.<br>
    &nbsp;&nbsp;&nbsp; Key_Val Var BYTE ' Key value.<br>
    &nbsp;&nbsp;&nbsp; sKey Var BYTE ' Key String Value.<br>
    &nbsp;&nbsp;&nbsp; SWITCHPIN VAR PORTD.1<br>
    <br>
    Main:<br>
    &nbsp;&nbsp;&nbsp; ADCON1 = 7 ' PortA = digital I/O<br>
    &nbsp;&nbsp;&nbsp; OPTION_REG.7 = 0 ' Enable PORTB pull-ups<br>
    &nbsp;&nbsp;&nbsp; PORTD = %00000010<br>
    &nbsp;&nbsp;&nbsp; TRISD = %10000000 ' Set Pin to Output<br>
    &nbsp;&nbsp;&nbsp; LOW SWITCHPIN<br>
    <br>
    END</p>

    <HR>

    But when I put a loop in or any other code it does not keep my PORTD.1 High.
    As soon as I release the ON button it turn off again?

    <HR>
    <p>&nbsp;&nbsp;&nbsp; INCLUDE &quot;modedefs.bas&quot; 'Standard Include for some
    variables.<br>
    &nbsp;&nbsp;&nbsp; DEFINE OSC 20 'Oscilator speed. <br>
    <br>
    &nbsp;&nbsp;&nbsp; Symbol SO = PortA.0 ' Serial Out<br>
    <br>
    &nbsp;&nbsp;&nbsp; Key_Col Var BYTE ' Keypad column.<br>
    &nbsp;&nbsp;&nbsp; Key_Row Var BYTE ' Keypad row.<br>
    &nbsp;&nbsp;&nbsp; Key_Val Var BYTE ' Key value.<br>
    &nbsp;&nbsp;&nbsp; sKey Var BYTE ' Key String Value.<br>
    &nbsp;&nbsp;&nbsp; SWITCHPIN VAR PORTD.1<br>
    <br>
    Main:<br>
    &nbsp;&nbsp;&nbsp; ADCON1 = 7 ' PortA = digital I/O<br>
    &nbsp;&nbsp;&nbsp; OPTION_REG.7 = 0 ' Enable PORTB pull-ups<br>
    &nbsp;&nbsp;&nbsp; PORTD = %00000010<br>
    &nbsp;&nbsp;&nbsp; TRISD = %10000000 ' Set Pin to Output<br>
    &nbsp;&nbsp;&nbsp; LOW SWITCHPIN<br>
    &nbsp;</p>
    <p>checkKeyPress:</p>
    <p>&nbsp;&nbsp;&nbsp; GOTO checkKeyPress</p>
    <p><br>
    END</p>
    <HR>
    <HR>

  9. #9
    Join Date
    Oct 2004
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    I have been bit the portD being parallel.
    I believe you have to set the trisE register to control it.
    I can't remember exactly but you may want to check it out.
    victor

  10. #10
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default You cannot use the same pin for keyboard scanning.

    Hi there,

    You cannot use the pin (portd.1) for any other purpose like a keyboard scanning routine (which you r doing as far as your schematic goes ).

    Please take note of the following. Why don't you use the ONA pin on the MAX1672.That is positive edge triggered. By default when a PIC wakes up the pin in an input (tristated). Do the following

    1. Turn of the AD and make the pin digital (if it has a muxed analogue in)
    2. Set the DATA direction register
    3. Throw the value to the port

    This will set your circuit kicking till you make the pin high and kill the power supply.

    A detailed schematic and complete code would be appreciated.

    Regards

    Sougata

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sougata
    Hi there,

    1. Turn of the AD and make the pin digital (if it has a muxed analogue in)
    2. Set the DATA direction register
    3. Throw the value to the port

    Sougata
    Hi, Sougata

    If you want to have safe outputs ( no "transitory levels" ) at startup, use the following :

    1. Turn of the AD and make the pin digital (if it has a muxed analogue in)
    2. Throw the value to the port
    3. Set the DATA direction register

    Old " unlogic" trick, when high power outputs used ... Easy to show with a PIC electronic ignition i.e.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  12. #12


    Did you find this post helpful? Yes | No

    Default

    Attached is my circuit, and my picbasic code not working and the one who is working?
    Attached Images Attached Images    

  13. #13


    Did you find this post helpful? Yes | No

    Arrow

    This code does not work
    <hr>
    INCLUDE "modedefs.bas"
    DEFINE OSC 20

    SWITCHPIN VAR PORTD.1

    Main:
    ADCON1 = 7
    OPTION_REG.7 = 0
    PORTD = %00000010
    TRISD = %00000010
    LOW SWITCHPIN

    checkKeyPress:
    GOTO checkKeyPress

    End
    <hr>

    but if I remove the loop:
    checkKeyPress:
    GOTO checkKeyPress

    Then it is working??

  14. #14
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Unhappy Level mismatch

    Hi there,

    Your working and not working code has the difference of only one loop. That's absurd why it should not work. If the portd.1 goes low okay then there should not a problem of level difference of the 5volt level at the micro side and maximum permissible level of 3v at the MAX side. However try inserting a diode (1n4148) with its anode coonected to the portd side in series with the 2k resistor. So you receive only the ground (negative) going pulse from portb (the on switch).

    try inserting some oscilloscope check routine like toggling a pin when you enter or exit the loop and find the relation of portd alongwith it. If possible post the entire code, the asm and the .cod file. I haven't worked much on the 16F877 as my choice of MCU is the 18F series still I will spend some time reading the manual and sort out any R-M-W issues. Would you mind spending a few miliamps ? Then go for a opto. Alternatively use the ONA pin and a 3volt zener in series with limiting resistor to translate the 5 volt level from the MCU to a 3 volt for the boost converter.

    Regards

    Sougata

  15. #15


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi Sougata


    Yes, I agree, that is absurd?

    I think the MAX1672 maximum voltage to switch on ONB is 0.4v.
    I think the 1n4148 would not take it that low, or would it?

    I have changed the portd.1 to another pin to see if it is working.
    Have tried portc.0 and porta.0, but it do exactly the same?

    Attached is the source code

    Thank you!!
    Attached Files Attached Files

  16. #16
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    > I think the 1n4148 would not take it that low, or would it?

    Have you actually tried it?

  17. #17


    Did you find this post helpful? Yes | No

    Default

    Hi Melanie

    I have blown my Max Chip.
    Will have to get some new ones tomorrow, will then try it.
    Thx

  18. #18
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Unhappy How did it happen?

    Hi ,

    How did you blow that chip ? Did it happen when you inserted the diode (1n4148) ? Or it just said goodbye. I think that so long we were concentrating on the software but consider this.

    1. The PIC consumes much greater current when active (no in sleep a.k.a END)

    2. MAX1672 is designed to deliver much more in order of a few hundred miliamps so no issues of overload even when active in the loop.

    3. The boost converter itself was unstable and was following a shutdown due to internal protection circuitry.

    4. Excessive ringing (bad pcb layout) can cause over dissipation of the chip following a thermal shutdown.


    When you get the chip do the following :

    Use a dedicated supply for the micro and use the logic to make the MAX switch on and stay then switch-off via code.

    Use the ONB as a momentary input(via switch) and a port of the chip with high level to the ONA to keep it on. Use high value pull-up and pull-down resistors. (1M) Use a series resitor of 10K from the port to the MAX ONA input. Ground a green LED and tie its anode to the ONA input. This should keep the levels safe for the MAX (2.4 volt for a green LED).

    Regards

    Sougata

  19. #19
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Thumbs down Just read the datasheets !!!

    Hi, Koosa

    The reason why is written in the first lines of the max specs ...

    Referring your design : Overvoltage on control pins ...

    Alain
    Last edited by Acetronics2; - 6th September 2005 at 12:40.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  20. #20
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You know this thread started off on 26 August here...

    http://www.picbasic.co.uk/forum/showthread.php?t=2273

    After all this time, are you telling me you haven't even tried the original solution?

  21. #21
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink just to be sure

    The design I looked at is this one : http://www.picbasic.co.uk/forum/atta...tachmentid=467

    The nearest ...

    Alain

    PS: Sorry, Mel ...a BAT85-like schottky diode must be used to reach the .4v max. low level spec ...

    If I could ...."RTFS" ... hi, hi,hi ...
    Last edited by Acetronics2; - 6th September 2005 at 13:31.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  22. #22


    Did you find this post helpful? Yes | No

    Arrow

    I have tried 2 different germanium diodes, but that does not work, so I went on to the alternative solution.

    I wanted to connect the ONA to VDD, but accidentally connected the PGND to VDD and that blown up my chip.
    Last edited by koossa; - 6th September 2005 at 15:46.

  23. #23
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Thumbs down basic Hardware doubts

    Looking further on the datasheet I got a good question ... how do your scheme reach any sleep ???
    Regulator output is disconnected when reg.disabled ...so pic disabled too !!!

    I suppose then regulator re-enabled ( enable input becomes high ...) so that's why your PIC port doesn't want to stay on the low state ...

    Good luck with it ... seems you've re-engineered the blinking PIC ...

    Alain
    Last edited by Acetronics2; - 6th September 2005 at 17:29.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  24. #24
    Join Date
    Aug 2005
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    Tie the input ONB to V+ and the input ONA to com both thru 1 meg resistors as in the data sheet, this will ensure the chip is off during power up.Tie portd.1 to the ONA input and remove the 2 k resistor between the input and output of the pic.Install regular pullup resistors for the keypad scanner,instead of using the portb weak pullups.Weak means very low current sourcing.
    Using your keypad scanner,you know what bit represents the ON button,create a routine that stores the state of that bit and compares it to the input bit.Toggle that bit on then off each time the ON button is depressed,ensuring you are de-bouncing properly.Have your portd.1 output toggle on/off with this bit.Also on your hardware initialization,be sure to tris portb.I also noticed you set the portd.1 = 1 then a line later low switchpin setting portd.1 = 0.

  25. #25


    Did you find this post helpful? Yes | No

    Default

    Thank you, I will try that!!

  26. #26


    Did you find this post helpful? Yes | No

    Red face

    Don't know what to do anymore?
    Attached are my new circuit and my code.

    I have now also connected the ONA pin of the MAX1672 to PortD.0 of the PIC16F877.
    According to the datasheet if I put ONA HIGH my circuit should stay on, no matter what ONB’s value is.

    It does work (Press ON button, Max1672 stays on) if I remove the highlighted piece of code in the attached screenshot.

    As soon as I put the highlighted code back, it does not work.
    When I press the ON button it turns on, but as soon as I release the ON button it turns off again?

    PLEASE HELP ME!!
    Attached Images Attached Images   

  27. #27


    Did you find this post helpful? Yes | No

    Default

    Why not post that part of the code then. There is obviously something in the code causing this issue.

  28. #28
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Subscription for glasses

    Koossa

    Did you really read my last post ???????????????????????????????????????????

    explanation there

    Alain

    You've just confirmed ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  29. #29


    Did you find this post helpful? Yes | No

    Default

    Hi Alain

    Sorry, I have thought you and Melanie's example was the same principal, so I have tried what she has suggest.

    A couple of questions:
    1) ONB is connected to V+ through a 1M resistor.
    What is the reason it is not connected directly to V+?
    2) "Install regular pullup resistors for the keypad"
    Will 470R do?
    3) Must I leave the rest of my circuit with the 10Ks and 2Ks as on the design?

  30. #30
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    The solution is quite simple : first think your Pic must ALWAYS be powered ...if it must control one of it's outputs.
    so, if your drive pin is floating ( sleep or off mode ) ... your MAX must be off ...

    a solution could be to have a supply for the Pic (Through a diode ) direct from the battery.
    You should then put your PIC in sleep mode when stopping the MAX supply and wake it by pushing a keyboard button ... have a look to PIC's spec to find the best way to awake it ( reset is the first, but may be a better way ...)

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  31. #31
    Join Date
    Aug 2005
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    Pull up pull down resistors are there for two reasons.First is to satisfy the inputs of the Max ic by driving them to the required state in which you want them to operate.ONA low,ONB high the Max is off on power up.The second reason is to protect the output of the pic.ONA must be driven high to change state,without the resistor you will be connecting high directly to low,V+ to com.Result is smoke ,silent death or if your lucky the 5v regulator will save you and get hot.
    As far as your circuit goes,stop connecting i/o pins together,remove the diode,disconnect the portd.1 from the Max,leave ONB pulled up to V+.Leave ONA connected with the pull down to portd.0.Add 10k pull up resistors to all the keypad scanner i/o.In your code create a routine that tests the portd.0 output only.portd.0 =1,pause 1000,portd.0=0,pause 1000,loop endlessly.Check the Max to make sure its operating.The idea is match the truth table for the Max.ONA high,ONB high the Max on.ONA low,ONB high the Max off.Next make sure your keypad scanner only is working.Now that your hardware is working put on your thinking cap,capture the ON bit ,store it,compare it,toggle the output.Or use the ON bit to turn it on and another key to turn it off.This is where the fun is picbasic.

  32. #32


    Did you find this post helpful? Yes | No

    Lightbulb

    Quote Originally Posted by arniepj
    ...In your code create a routine that tests the portd.0 output only.portd.0 =1,pause 1000,portd.0=0,pause 1000,loop endlessly.....
    As far as I can see, my circuit and PIC would be switched off if I put portd.0 = 0 (ONA)?

  33. #33
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Koosa,

    I see in the last schematic that you have ground tied directly to RB3. This is going to be very bad once you start trying to scan the keypad again. But for now, with the simple turn on test it will be OK.

    If you happen to have a couple minutes, could you try loading this HEX file into your project? Just want to test something.
    Attached Files Attached Files
    DT

  34. #34


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel

    I would really appreciate any help.
    How do I put it on my PIC.
    Must I keep my circuit the same?

  35. #35
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Yes, Just like you showed it in the last schematic, with the diode and both ONA and ONB connected. You can fix the RB3 thing later.
    <br>
    DT

  36. #36


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel

    I have import the Hex file into my project and program the pic.
    But it is still the same, when I press the ON button it turn on, but if I release it, it switch off again.

  37. #37
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    OK, now this is just getting cRaZy. I can't stand it anymore!!!

    Do you have a schematic of the way you have the MAX1672 set up?

    I'm going to duplicate your circuit and see if I can make it do the same thing. This is just too weird.
    <br>
    DT

  38. #38


    Did you find this post helpful? Yes | No

    Default

    I will qiuckly draw one, thanks!!

  39. #39


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel

    Attached is my complete circuit as put out on my breadboard.
    Attached Images Attached Images  

  40. #40


    Did you find this post helpful? Yes | No

    Arrow

    I have put a LED connected to PortC.3 whith the athached code and my pic do start up, becuase the LED is flickering, but when I release the ON button it stops.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=476&stc=1" border="1">
    Attached Images Attached Images  

Similar Threads

  1. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  2. confused problem with interrupt in a working program
    By illuminator4 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th November 2008, 17:01
  3. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  4. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  5. 4-line LCD Help - using PortA instead of B
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 31st March 2005, 03:14

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