0
   

can atmega168 in arduino duemilanove be replace with pic microcontroller?

 
 
Reply Thu 14 Apr, 2011 11:03 am
any idea of how to make secret knock detecting door lock by using PIC microcontroller?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 2,179 • Replies: 7
No top replies

 
jespah
 
  1  
Reply Thu 14 Apr, 2011 04:58 pm
@ElectroThinker,
Holy cannolli, a robotics question!

I work for a robotics company, so this is exciting to me just to see this.

I'll see if I can get a colleague to answer you.
0 Replies
 
Thomas
 
  1  
Reply Thu 14 Apr, 2011 09:12 pm
@ElectroThinker,
To the question in your title: No, I don't see how the atmega168 in Arduinos can be replaced with PIC microcontrollers. At least two reasons speak against it:

1) The pins aren't the same on both chips, so the arduino board would mismatch the microcontroller chip.

2) The GNU C compiler, which compiles C code to atmega 168 machine code, doesn't support PIC controllers as a target. For philosophically similaar products using PIC, search the web for "PIC Axe" or "Basic Stamp".

As for the queestion in the body of your message: It shouldn't be too hard to install a cheap surface microphone on your door that feeds into your Arduino, PICAxe, or whatever. Googling for "Arduino, microphone" yields promising hits that you might want to check out. The rest is tinkering.
Ragman
 
  1  
Reply Thu 14 Apr, 2011 09:22 pm
@Thomas,
Hell, I got a simpler intrusion solution. My Border Collie Brady is the best intrusion detector I've ever seen and he has a power supply that is uninterrutptible.
dadpad
 
  1  
Reply Thu 14 Apr, 2011 10:26 pm
@Ragman,
A border collie would be able to detect the rythm of a secret knock too given some encoragement.
apologies OP. Back to your querie
jespah
 
  1  
Reply Fri 15 Apr, 2011 06:00 am
@dadpad,
According to my colleague in the robots biz:

Quote:
Well this is sort of a broad question looking for a specific answer. Many PIC uc's out perform their AVR counterparts on many fronts. So if the question is "if a pic can do it", then of course yes. With the arduino there are likely to be sample projects. As for actually doing it, a microphone and an opamp with its output going to an interupt pin would do it. Decode the edges against time to determine the pattern, and thus the secret code.
0 Replies
 
Thomas
 
  1  
Reply Fri 15 Apr, 2011 12:33 pm
I second what Jespah's source said about Arduino sample code. Chances are it'll help a lot in getting you started on the right path.

Also, I expect that you'll be more limited by memory than processing speed as you "decode the edges against time to determine the pattern, and thus the secret code". You'll probably struggle to fit all the programming you need for sound-decoding and pattern-matching into 16k of memory. If that's indeed what constrains you at the moment, try doubling your memory by replacing your atmega168 with an atmega328. That should work better.
0 Replies
 
ElectroThinker
 
  2  
Reply Fri 15 Apr, 2011 09:07 pm
@ElectroThinker,
guys thank for all your helpful answer.I'm new in this field and really wanna learn about it~
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » can atmega168 in arduino duemilanove be replace with pic microcontroller?
Copyright © 2022 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 01/16/2022 at 04:30:42