SparkFun Forums 

Where electronics enthusiasts find answers.

Search found 969 matches

 Go to advanced search

Re: VCNL4040 Interrupt

 by phalanx ¦  Thu Apr 04, 2019 3:48 am ¦  Forum: Distance, Range Finders & Infrared ¦  Topic: VCNL4040 Interrupt ¦  Replies: 16 ¦  Views: 307

LEDLIT1 wrote: Wed Apr 03, 2019 5:30 pm Polling seams to always be an issue, and an occasional basketball can slip by undetected.
Is there any reason why you can't use an external interrupt on your microcontroller? With the exception of very low-end 8-bit parts, almost all MCUs have them, Arduinos included.

-Bill

Re: VCNL4040 Interrupt

 by phalanx ¦  Wed Apr 03, 2019 2:55 pm ¦  Forum: Distance, Range Finders & Infrared ¦  Topic: VCNL4040 Interrupt ¦  Replies: 16 ¦  Views: 307

Like any interrupt, it gives you the ability to focus on other tasks without having to constantly poll the device which is a waste of processor time and power. Think about a battery powered application like a paper towel dispenser where you want to maximize battery life. The interrupt pin can be use...

Re: Running five 1.5-3 volt dc motors

 by phalanx ¦  Sat Mar 23, 2019 7:54 am ¦  Forum: General Chit Chat ¦  Topic: Running five 1.5-3 volt dc motors ¦  Replies: 4 ¦  Views: 109

You can use MSPaint to resize jpegs. So I'm still going to need more details from you. I need the schematic to understand how you have the motors connected and how you are getting 1.5V and 3.0V from your 5V supply. I need more details for your motors (specifically current draw while under load) and ...

Re: Running five 1.5-3 volt dc motors

 by phalanx ¦  Thu Mar 21, 2019 4:26 pm ¦  Forum: General Chit Chat ¦  Topic: Running five 1.5-3 volt dc motors ¦  Replies: 4 ¦  Views: 109

Can you show us a schematic of how you have everything connected, a datasheet for your motors, and the details of your power supply?

-Bill

Re: Connecting a load cell to a HX711.

 by phalanx ¦  Tue Mar 12, 2019 1:03 pm ¦  Forum: Load Cells & Amplifiers ¦  Topic: Connecting a load cell to a HX711. ¦  Replies: 2 ¦  Views: 92

Do you have more details on the load cell you are using? Typically 3-wire load cells are intended to be used as differential pairs with one experiencing compression and the other experiencing tension.

-Bill

Re: Identifying source of interrupts: nonsense?

 by phalanx ¦  Sun Mar 03, 2019 7:10 pm ¦  Forum: PIC ¦  Topic: Identifying source of interrupts: nonsense? ¦  Replies: 5 ¦  Views: 265

I started doing that, and I think you’re saying that I got it right. Now that I understand the way you want to implement this, it makes sense to check if your interrupt is enabled before processing TMR0 data. ...since I have never seen any reference to it in this context. This is why I said your ca...

Re: Identifying source of interrupts: nonsense?

 by phalanx ¦  Sat Mar 02, 2019 11:04 am ¦  Forum: PIC ¦  Topic: Identifying source of interrupts: nonsense? ¦  Replies: 5 ¦  Views: 265

What you're describing isn't making clear sense to me. Running 3 timers is not atypical. What I originally thought you were doing with the 3 timers is what's atypical. I'm running all three timers and T0 cannot be switched off, so it continually sets the IF, which is then taken by my ISR as an inter...

Re: Identifying source of interrupts: nonsense?

 by phalanx ¦  Sat Mar 02, 2019 4:24 am ¦  Forum: PIC ¦  Topic: Identifying source of interrupts: nonsense? ¦  Replies: 5 ¦  Views: 265

"Nonsense" and "rubbish" are unnecessary superlatives. The process described to you is by far the most common one that people encounter. Obviously if you are continuing to run a timer while disabling its interrupt, you need logic in your ISR to accommodate that if you have other active interrupts. Y...

Re: Spammer List

 by phalanx ¦  Thu Feb 28, 2019 2:50 pm ¦  Forum: Terms of service and best practices ¦  Topic: Spammer List ¦  Replies: 690 ¦  Views: 142628

The report post button functionality has been restored. Let me know here or in a PM if that isn't the case for you.

-Bill

Re: Spammer List

 by phalanx ¦  Mon Feb 25, 2019 4:11 pm ¦  Forum: Terms of service and best practices ¦  Topic: Spammer List ¦  Replies: 690 ¦  Views: 142628

Thanks for the heads-up about the report button not working. I'll let the SparkFun powers-at-be know about it.

-Bill

Re: Over voltages or surge voltages

 by phalanx ¦  Fri Feb 08, 2019 5:27 am ¦  Forum: Power Management ¦  Topic: Over voltages or surge voltages ¦  Replies: 2 ¦  Views: 487

The simplest way is to use a device called a varistor. In a normally operating circuit, it appears as an open circuit. If the input voltage exceeds the rated voltage of the varistor, it starts to conduct. By installing one across the hot and neutral input path (or + and - terminals for a DC/DC suppl...

Re: PIC16F819 count down timer

 by phalanx ¦  Thu Jan 31, 2019 3:03 pm ¦  Forum: PIC ¦  Topic: PIC16F819 count down timer ¦  Replies: 1 ¦  Views: 95

Are you familiar with interrupts? One of the easiest ways to implement what you are trying to do is to have a timer running in the background generating interrupts at regular intervals. Every time it interrupts, you increment a variable that keeps track of your "time." When your first button is pres...

Re: PIC16F527 RA4 not working

 by phalanx ¦  Sun Jan 27, 2019 9:30 am ¦  Forum: PIC ¦  Topic: PIC16F527 RA4 not working ¦  Replies: 11 ¦  Views: 178

How do you have your switches connected to the RAx pins?

-Bill

Re: PIC16F527 RA4 not working

 by phalanx ¦  Sun Jan 27, 2019 9:28 am ¦  Forum: PIC ¦  Topic: PIC16F527 RA4 not working ¦  Replies: 11 ¦  Views: 178

Do you have a debugger of any sort? You can set a breakpoint after the TRISA register is updated and then inspect its actual contents.

-Bill

Re: PIC16F527 RA4 not working

 by phalanx ¦  Sun Jan 27, 2019 9:06 am ¦  Forum: PIC ¦  Topic: PIC16F527 RA4 not working ¦  Replies: 11 ¦  Views: 178

TRISA=0x01; //PORTA pins input.
This would set only RA0 as an input.

I would expect TRISA=0x15 in order to get RA0, RA2, and RA4 as inputs.

-Bill

  • 1
  • 2
  • 3
  • 4
  • 5
  • 65