Hack Notes CVA 090601
Revision as of 17:32, 9 June 2009 by SpammerHellDontDelete
 Skory's random notes
Some more notes from putting together our PCBs. These span several days past June 01, but whatever.
- shift reg: Unused inputs must be connected to VDD, VSS
- hole on vreg and battery hole CAN line up! it's ok to put screw through v-reg, says mitch
- the pin translation for the new shift register:
// define the pins used to run the shift registers int enable_low = 3; //STR int serial_in = 5; //D int ser_clear_low = 2; //OE int RCK = 0; //not used! int SRCK = 4; //CP
- OE is high, not low. At least I think so
- the Arduino's built-in shiftOut function only works for 8 bit shift registers. I rewrote it (with the help of Mikolaj's C-fu) to work for 12 bit shifting outing. The current function probably wouldn't work quite as expected if not using LSBFIRST, but we are so who cares...
- Writing ints as B010101... only works for bytes. So, we could write a conversion function (i.e. myInt = (B00001100 * 256) + B10101010; // B11001100 is the high byte) if it's too confusing, but I changed the TurnMotorOn function's switch statement into a bunch of ints.
- WHOA. Our FTDI pinout is totally not the same as on our BUB boards! So, I built a very ghetto little adaptor.
- Update: It's actually the same but backwards - adaptor not needed, it suffices to flip the BUB board over. The biggest confusion was the silk screening of TX and RX, whether this should match the pins on the ATMega or the pins on the BUB board which are inverse of each other. I feel matching the BUB board is less confusing.
- First attempt to program board: "avrdude: stk500_recv(): programmer is not responding"
- It occured to me that the power switch does nothing when powered from the FTDI pins. While not a serious problem, we should try to fix this for consistency if it doesn't overly complicate to board.
- Board powered up, but won't program.
- DTR matters! Unplug it on the RBBB and I get this:
"Couldn't determine program size: avrdude: stk500_getsync(): not in sync: resp=0x0e avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x0e"
- clock rate matters? RBBB will program when complier is set to 8MHz Arduino Pro Mini...?
- Went back and changed the board setting in the arduino IDE to mini 8MHz and then re-burned. the boot-loader
- Now it won't upload if I put that chip into my RBBB with it's 16MHz clock. Good Sign.
- But then putting it into our board with 8MHz clock and what should be 8MHz bootloader and still failing at uploading code.
- conclusion: resonator fuct
- TODO: find out what kills resonators, avoid in future
- UPDATE: with WORKING resonator and CORRECT (8MHz) bootloader burned, OUR PCB works!!1!
- should we change motor number silk screen?
- NOTE: 8MHz clock cannot support 115200 baud rate! Serial must be set at 57600 at most in code and on the serial monitor. (This is why I was getting garbage at first.)
 Stuff we/NB need
- right angle header pins
- ribbon cable