Show Posts
|
|
Pages: [1]
|
|
2
|
Using Arduino / General Electronics / supplier for flatted-shaft knob without pointer
|
on: February 12, 2013, 10:58:01 pm
|
|
Hello all!
I'm working on a project that uses several rotary encoders (just discovered pin-change interrupts on an ATMEGA328 -- awesome!), and I'm having a very hard time finding a source for knobs. Does anybody have any suggestions where I can find knobs for a 6mm flatted "D" shaft with no pointer line or dot? My usual go-to source is mouser.com, but either they don't carry much or I'm just not getting along with their search engine this time. I'd prefer a US distributor, but I'd be willing to consider ordering internationally too.
Thanks!
|
|
|
|
|
3
|
Forum 2005-2010 (read only) / Interfacing / Re: DMX woes...
|
on: June 14, 2010, 05:01:42 pm
|
|
I know I just posted this in another thread, but hopefully adding it here will help the next person who goes searching for this information.
The interrupt handler for the USART receive signal appears to have changed at some point for the ATMega328 chip. Starting with gaggenau's code as shown earlier in this thread, change...
this: SIGNAL(SIG_USART_RECV) { // for ATMega168 ... }
to this: SIGNAL(USART_RX_vect) { // for ATMega328 ... }
Ironically both names seem to work fine for the ATMega168. I realized something was wrong with the interrupt handler routine because the compiled sketch was staying the same size even when I commented out parts of the routine.
I'm running Arduino-0018. Hope this helps.
Jeremy
|
|
|
|
|
5
|
Forum 2005-2010 (read only) / Interfacing / Re: ATMega168 vs 328 USART -- what's different?
|
on: June 14, 2010, 04:56:46 pm
|
|
OK, I think I found the problem. The name of the interrupt handler needed to be changed from:
SIGNAL(SIG_USART_RECV) { // for ATMega168 ... }
to: SIGNAL(USART_RX_vect) { // for ATMega328 ... }
Ironically both names seem to work fine for the ATMega168. I realized something was wrong with the interrupt handler routine because the compiled sketch was staying the same size even when I commented out parts of the routine.
Good news is that I did learn a few things about the inner workings of the chip in the process -- little did I know that the full datasheet was 500+ pages long... yikes! Looks like I've got some more reading to do.
Jeremy
|
|
|
|
|
6
|
Forum 2005-2010 (read only) / Interfacing / Re: ATMega168 vs 328 USART -- what's different?
|
on: June 14, 2010, 12:57:47 pm
|
|
Yes, I got an upload error message if I didn't.
For the ATMega328, I used "Arduino Duemilanove or Nano w/ ATmega328". For the ATMega168, I used "Arduino Diecimila, Duemilanove, or Nano w/ ATmega168".
Otherwise everything else is the same -- hardware board, parallel programming cable, sketch, etc.
Jeremy
|
|
|
|
|
8
|
Forum 2005-2010 (read only) / Interfacing / ATMega168 vs 328 USART -- what's different?
|
on: June 14, 2010, 12:00:02 pm
|
|
I'm working on a DMX receiver circuit that I originally developed for the ATMega168 chip (I'm using bare chips and my own boards). When I reordered more chips I got the ATMega328 instead, thinking that the only difference was more memory. My problem is that the ATMega168 chip works and the ATMega328 chip doesn't, even though I'm uploading the same sketch and using the same board.
The ATMega168 will properly receive the DMX signal coming in on the RX pin (via an SN75176). The ATMega328, however, freezes when it sees anything on the RX pin. Is there something different about the USART on the 328?
I'll keep browsing through the forum here, but if anyone can help me figure out what's different between the 168 and 328 I'd love to hear from you. I'm currently using Arduino-0018 on Xubuntu Linux.
Jeremy
|
|
|
|
|