Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:53 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM Interrupts

Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 09:48pm 22 Jul 2013
Copy link to clipboard 
Print this post

I had a program running on my MM and for no known reason the Interrupts stopped working. I wrote a small test program with an Interrupt and it wouldn't work either. I then wrote a small program to switch the Pins high and low and this was OK, so the connection is OK. Could this be a problem with the MM itself.
Also should the Interrupt pins be held low with a pulldown and pulled high with a resistor. I have my pins floating and connect directly high. But it has always worked before.
PaulEdited by palcal 2013-07-24
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 10:55am 23 Jul 2013
Copy link to clipboard 
Print this post

  palcal said  
Also should the Interrupt pins be held low with a pulldown and pulled high with a resistor. I have my pins floating and connect directly high. But it has always worked before.
Paul


Inputs floating is not a good idea.
A 4.7 to 10k resistor to ground then switch the input to 3.3V is preferred.

Jim
VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 02:23pm 23 Jul 2013
Copy link to clipboard 
Print this post

Agreed.

I tend to use 10k pull-up's or pull-down's for general I/O pins, but I hear that 4k7 is also a favorite value with many people. Not sure that there is really any benefit to using 4k7 over 10k - perhaps someone here can enlighten me on that one. My guess is that 10k will provide a weak-but-definite high or low reference, whereas 4k7 will provide more along the lines of a firm-but-definite reference.

As you are not wanting to actually pass any significant current to the pin, rather just give it a default high or low reference point, I don't think it matters that much, so long as you have one!

I do note, however, that keyboards and I2C buses like 4k7 pull ups...

Also something to remember - some pins on the PIC32 are 5v tolerant, and others are not - BE CAREFUL! 5v into a non-5v tolerant pin will likely kill the PIC32...

I used to use voltage inputs, but of late, I have adopted the more standard method of pull-up's and grounding the pin if it is switches etc. I have had issues before in the past(with other PIC's) when ground-referencing the pin, and pulsing the pin high to trigger it. Once installed, if there is any induced voltage in the connecting wire to the switches, the PIC can respond to these as input pulses. This does not generally happen if the input is high-referenced, and you ground the pin to trip. I use a 1k series resistor on the input pins too(a-la PICAXE 1k/10k idea for any input pin), to limit any current into the pin.Edited by Grogster 2013-07-25
Smoke makes things work. When the smoke gets out, it stops!
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 02:43pm 23 Jul 2013
Copy link to clipboard 
Print this post

  Grogster said   Agreed.
I do note, however, that keyboards and I2C buses like 4k7 pull ups...

If the resistor is acting as a pull-up and the line has some capacitance on it (don't they all?) then a lower value resistor will help signals to switch faster.

Grogster, some time back you were getting problems with your keyboard(s). Was this part of the problem or has it just magically disappeared?
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 03:36pm 23 Jul 2013
Copy link to clipboard 
Print this post

  BobD said  If the resistor is acting as a pull-up and the line has some capacitance on it (don't they all?) then a lower value resistor will help signals to switch faster.

Grogster, some time back you were getting problems with your keyboard(s). Was this part of the problem or has it just magically disappeared?


Cheers for that. I guess that explains the 4k7 on data lines, and 10k on switch lines.

Yes, still have the KB problems. As my development CMM is the CG one, the KB_CLK and KB_DTA pull-ups are SMD 10k ones, from what I can tell. Switching them to 4k7 is something I would like to try, but it is really beyond my soldering ability due to the fact that I think the resistors are 0603 type - they are TINY - too hard to hand solder that size.Edited by Grogster 2013-07-25
Smoke makes things work. When the smoke gets out, it stops!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 08:20pm 23 Jul 2013
Copy link to clipboard 
Print this post

Thanks all, I was connecting 5v. to pin1 just didn't think. Have connected a pullup and using 3.3v. but the interrupt is very erratic and the micro eventually freezes. Tried other pins but the same happens.
Have ordered a new micro, guess I learnt the hard way.
Thanks
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 08:55pm 23 Jul 2013
Copy link to clipboard 
Print this post

If by "Pin1" you mean I/O 1, then yes - that is a 3v3 I/O and is NOT 5v tolerant.

I/O's 1 through 10 and 35 through 40 are not 5v tolerant.
All the others ARE 5v tolerant.

SOURCE: CGCMM datasheet, CGCOLORMAX1 Pin Outs and Function, page 469, manual version 1.3

Although this is for the CG CMM units, any CMM clone will be the same, as it is the same PIC32 chip.Edited by Grogster 2013-07-25
Smoke makes things work. When the smoke gets out, it stops!
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 10:14pm 23 Jul 2013
Copy link to clipboard 
Print this post

  Grogster said   Switching them to 4k7 is something I would like to try, but it is really beyond my soldering ability due to the fact that I think the resistors are 0603 type - they are TINY - too hard to hand solder that size.


Hi Groggy,

As a suggestion, open your keyboard and add 10k pullups inside it (it will be a lot easier and the 2 sets of 10k will create a 5k pullup, you can experiment with values and see if a harder pullup is needed. I wouldnt like to go below the 1k mark though (not that any damage would occur)

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 10:25pm 23 Jul 2013
Copy link to clipboard 
Print this post

"Bloody Hell - now that's what I call thinking."
- HitchHiker's Guide To The Galaxy.

Brilliant idea, Mick - cheers, mate!
Smoke makes things work. When the smoke gets out, it stops!
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 01:41am 24 Jul 2013
Copy link to clipboard 
Print this post

@Grogster,

If above does not work you might want to put your keyboard signal through a schmitt trigger.
It looks like the levels for 0 and 1 are 'shaky' and a schmitt trigger will clean that up.

Microblocks. Build with logic.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 12:31pm 24 Jul 2013
Copy link to clipboard 
Print this post

Thanks TZA - another good idea. I will do the KB mod over the weekend, and try it for a while, and let the thread know.

MODS: This thread seems to have been unintentioanlly hijacked. Perhaps it would be a good idea to split it into palcal's orignal question, and add the KB bits to my older thread about KB issues?

...I will leave it up to the moderators to decide on that one, it's just that this thread has deviated a little from palcal's original post - sorry...
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024