Author Topic: PinChange interrupt?  (Read 13174 times)

BIA

  • NewMember
  • *
  • Posts: 14
Re: PinChange interrupt?
« Reply #15 on: June 10, 2014, 01:40:16 PM »
I agree wholeheartedly. This chip, MK20DX256, http://www.mouser.com/ProductDetail/Freescale-Semiconductor/MK20DX256VMC7/?qs=6ddF3R/6EV8uWVNeTG2uUQ==, is compatible at 3.3v and 5v. I don't know if you could integrate it with the RFM chips but it would be an awesome product if you could. You would have to modify the standard Arduino IDE and bootloader but it would be well worth the effort. The price about the same as the 1284P.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: PinChange interrupt?
« Reply #16 on: June 10, 2014, 02:18:57 PM »
You know that looks like a great chip, but most people are having a hard time using anything but the Arduino IDE. I know some of the more expert folk use AVR studio and other environments but they are the few exceptions. I can't even imagine what effort it would take to build a dev board around such a chip (BGA too :)), price it right, and make it profitable and worth it. I am trying to have a few products that make sense, are easy to use, reasonably priced, and address 99% of people's needs. Adding the 1284 or similar chip would solve another 0.5% of needs. There are other cortex chips that are not BGA, but nobody that I know of has ported such a core to the Arduino IDE with proper documentation. I think the Arduino folks should look into moving towards cortex chips that can run 72mhz at 3.3V or less, and dump atmel's lazy attitude, limited set of chips and ultra inflated prices.

BIA

  • NewMember
  • *
  • Posts: 14
Re: PinChange interrupt?
« Reply #17 on: June 10, 2014, 03:17:40 PM »
Agreed. Atmel has a lazy attitude and limited chipset because they have a stranglehold on the Arduino/hobby marketplace. The only way that is going to change is if more integrators start using other chips such as the Freescale chips. Not holding my breath that the "Arduino folks" are going to do anything.

KanyonKris

  • Full Member
  • ***
  • Posts: 113
Re: PinChange interrupt?
« Reply #18 on: June 10, 2014, 08:13:23 PM »
Adding ARM to Arduino has been done. The Teensy 3.0 and 3.1 boards with Teensyduino.

https://www.pjrc.com/teensy/teensy31.html

https://www.pjrc.com/teensy/td_download.html

Perhaps you could work with Paul (the Teensy engineer/owner) to make a Teensy with a RFM69. From my reading in the forums Paul seems like a nice guy. Sadly his designs have been copied by others when they could have contacted him to distribute his boards, but I guess that's what comes with open source. Still, I think it would be courteous to contact Paul first before going it on your own.
« Last Edit: June 10, 2014, 08:28:47 PM by KanyonKris »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: PinChange interrupt?
« Reply #19 on: June 11, 2014, 08:31:15 AM »
Teensy is cool and v3 even cooler. But it was always only almost open source. There is only a schematic, some documentation on the bootloading process. I have a teensy v2 but not a v3 but looks like it's the same. I know he's using halfkay and he has an application to load the binary. I haven't watched his progress up close and I checked again today but still there are no source files or anything that would qualify it as open source. Nothing wrong with that, he is filling a niche gap which is great.
Right now staying focused and releasing new products while improving existing is very very hard. Partnerships almost always suck and end up in regret and lost time and dismal/zero profit. I am building a new version of the Moteino MEGA that addresses the issues I've had. If ARM becomes mainstream a Moteino ARM would be cool ;)

Lensdigital

  • Full Member
  • ***
  • Posts: 155
    • Lensdigital
Re: PinChange interrupt?
« Reply #20 on: November 17, 2014, 01:42:09 PM »
I've recently experimented with Moteinos (both R2 w/ RFM12b and R3 w/RFM69) powered by coin cell battery and in my case pinChangeInt library worked extremely well, and I saw no issues at all (to my surprise). My goal was to wake Moteino from "deep sleep" by pressing multiple buttons (thus D3 was not enough). In my cases I tested it with 3 buttons connected to various pins (I think I tried it with most of Analog pins and D4).  There was no conflict with radio module.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: PinChange interrupt?
« Reply #21 on: November 17, 2014, 07:04:15 PM »
That's really great, thanks for the results follow up.
Any code samples you could perhaps share for the community or others that might be interested in trying the same?

Charly86

  • Jr. Member
  • **
  • Posts: 74
  • Country: fr
Re: PinChange interrupt?
« Reply #22 on: November 20, 2014, 05:58:37 AM »
Hi There,

In my RFM12B library (based on Felix's one) I used both (Hardware IRQ0 and IRQ1) but also Pinchange

take a look on there https://github.com/hallard/RFM12B_arssi in .cpp source code, the refering function is called ConfigureInterrupts

if you define #PINCHG_IRQ then it will use the pinchange mode, then you need to define #RFM_DEFAULT_IRQ with a value from 0 to 14 to use PCCINT0 to 14

It was working fine when I've done tests.




Lensdigital

  • Full Member
  • ***
  • Posts: 155
    • Lensdigital
Re: PinChange interrupt?
« Reply #23 on: November 24, 2014, 02:53:25 PM »
That's really great, thanks for the results follow up.
Any code samples you could perhaps share for the community or others that might be interested in trying the same?
Sketch attached.
I'm using 2 buttons for it.
« Last Edit: November 25, 2014, 11:29:10 AM by Lensdigital »