Search results

  1. C

    Bluetooth Low Energy (BLE) - Laird BL600 module (Nordic Semi nRF51822 Cortex M0)

    Note that this appears to be for the nRF8001 chips in particular a specific BLE shield. It's cool that they're officially supporting the Arduino community. However, it seems like there are already existing open source libraries for this external SPI-protocol BLE chip. This is not, however...
  2. C

    Bluetooth Low Energy (BLE) - Laird BL600 module (Nordic Semi nRF51822 Cortex M0)

    Hi Alistair, Yeah, I've spent a significant amount of time with the nRF51822 chips, albeit first with their dev kit and then with a custom board (which also includes EPaper display hardware). The chip is easily the best documented part I've ever worked with and quite capable. You don't need...
  3. C

    Teensy 3 MicroSD guide

    Random question: if I only have one SD card slot on the SPI bus, do I need to use a pin for Chip Select or can I simply ground it?
  4. C

    Understanding part of epaper display circuit

    I have the Adafruit e-paper display working with the teensy 3. I'm trying to make a board that has the example circuit for that epaper display. I'm trying to understand and perhaps simplify a specific part of this circuit: The complete circuit diagram is here. The epaper display is spec'd...
  5. C

    MIDI HID combo

    I have this working on teensy 3 here. Main program here. As Paul said, it's just a matter of editing code. :) -c
  6. C

    Using std::vector ?

    I re-read my comments above, and while I think they are all true, they're not very concretely helpful. I'd like to help, though. To that end, I've written a simple test program. The main guts of it are: string hello = "hello "; uint32_t size = 10; vector<string> vec; vec.reserve(size)...
  7. C

    Using std::vector ?

    I'm making pretty extensive use of stl and C++ in a project. I mostly create containers at startup at startup, use reserve() to preallocate, and try to avoid extending them beyond that allocated size. I've wrapped the STL containers so that in the future I could replace them with fixed sized...
  8. C

    fixed point math library

    I'm looking for a good fixed point math library for some graphics stuff. Needs to have trig. Nice to have a C++ library with operator overloading. Nice to have something that's optimized for ARM. Has anyone used a fixed point library? Which one? Thanks, -c
  9. C

    Teensy 3 SPI Basic Clock Questions

    I spent a bunch of time messing with the SPI unit before finally getting it to work. I haven't tried to use it as a slave. Three things that helped me: Make sure you enable the clock to the SPI unit: // Enable Clock to SPI. from page 241 of Kinetis K20 Reference Manual. SIM_SCGC6 |=...
  10. C

    Noob question

    The teensy always runs the flashed program when it is started regardless of whether it is connected to USB. Is it possible that you're doing something which is requiring USB? You didn't say which teensy you're using, but I had some programs for the teensy 3 that did something like...
  11. C

    Teensy 3 I2C to battery fuel gauge. Pullups.

    Scott and I reflowed the chip and then spent some time with his scope. Without enabling the t3's internal pullups, with just 10k external resistors we were seeing some significant ramping on the sda line. I'm concerned that, due to some of the issues mentioned elsewhere, the T3's internal...
  12. C

    Teensy 3 I2C to battery fuel gauge. Pullups.

    I'm trying to talk to this MAX17048 battery fuel gauge. I designed a board and soldered it using a hot plate. I fear I may have either not completely soldered it or may have fried the chip during soldering because I can't seem to talk to it. However, this is the first time I've used I2C and...
  13. C

    Teensy 3 as AVR ISP programmer?

    Has anyone succeeded in using the emulated SPI code to run the AVR-ISP program in the arduino examples directory on a teensy 3? I'm trying to program a ATMEGA328P-PU and I'm getting the following: > /usr/local/CrossPack-AVR/bin/avrdude -c arduino -p m328p -P /dev/tty.usbmodem12341 -b 19200...
  14. C

    Any reason why SysEx length is hardcoded at 60 bytes in usbMIDI usb_api.h?

    I would love to see a bit better API for sysex. It took a bit of effort to figure out the current one. In particular that the length was in usb_midi_msg_data1 and that this was an 8bit quantity and therefore we couldn't receive messages larger than 254 bytes or so (because of begin and end...
  15. C

    Control AC Mains voltages

    Sorry if this is a FAQ, but I'd like to control grounded AC mains devices with a teensy 3 (3.3V). Obviously I can just use a relay with a low enough coil current and a high enough rating. However, I'd rather not do this wiring myself, mostly because the devices controlled are fairly inductive...
  16. C

    Teensy3 regular sampling with ADC using interrupt

    I also have code to use the DMA to do this here: http://hg.cmason.com/teensy3/src/90cffffb1abe3da67810725a14924ef19349a405/teensy/main_sampler.cpp http://hg.cmason.com/teensy3/src/90cffffb1abe3da67810725a14924ef19349a405/teensy/sampler.h It stores the samples in a ring buffer and then you can...
  17. C

    I have a Teensy 2.0, and an idea for what I want to do in MIDI.

    Adafruit has a bunch of really useful tutorials. They are not teensy-centered per se but they are pretty easily adapted. For instance: digital in, multiple button debounce, analog input.
  18. C

    Serial vs raw HID vs something else?

    I agree about HID versus Serial. Seems way easier from a user perspective. There's a bunch of really nice libraries, for instance from node. I've been using JSON to encode the data. This is perhaps a bit more heavyweight than necessary, but there's lots of good libraries to parse JSON and it...
  19. C

    Internal pull up and pull down resistors on teensy 3

    You can just use the code I posted above: *portConfigRegister(pin) = PORT_PCR_MUX(1) | PORT_PCR_PE; -c
  20. C

    Newb type question - Reading voltage coming in.

    Dedicated LiPo battery charger chips I've been investigating making a battery charger/monitor board for the teensy3. I've been looking at dedicated chips for charging Lithium Polymer (LiPo) batteries, such as these very affordable bare cells from HobbyKing: 20C 1000mAh $2.50, 40C 5000mAh...
  21. C

    WS2811 on Teensy 3.0 using FastSPI_LED library

    I don't see any prices there, but these folks have 4-5m strips of 60 LEDs/m for ~$12 per meter, and strips of 30 LEDs/M for ~ $7/m: http://www.aliexpress.com/store/product/4m-WS2811-LED-digital-strip-60leds-m-with-60pcs-WS2811-built-in-tthe-5050-smd-rgb/701799_633124138.html...
  22. C

    WS2811 on Teensy 3.0 using FastSPI_LED library

    So, can someone help double check my math here on the timing for using SPI? This diagram (from here): shows 1.25us cycle. I think what happens with these chips is that in the middle of the cycle, it samples the line; if high 1 is registered, if low 0. Does this agree with what others have...
  23. C

    WS2811 on Teensy 3.0 using FastSPI_LED library

    I spent some time playing with these LEDs which have an integrated WS2811 controller. (Thanks to Ward Ramsdell from Dorkbot for spotting me a few of them to play with.) I could get it to light up and even change color a bit but I never felt like I got the full spectrum of color out of it. I...
  24. C

    Teensy loader for Raspberry Pi?

    Recent raspbian distributions are set up to use hardware floating point. Some cortex m4 chips have an FPU, but not the one in the teensy. There are some (older?) raspberry distributions that have softfp but the performance is so much better on the raspberry with hardfp that I have to assume...
  25. C

    Compile-Error when wanting to use Adadruits SSD1331 with Teensy 3.0

    So, this library and the given code: Adafruit_SSD1331 display = Adafruit_SSD1331(1, 2, 3); compiles fine for me with the modifications described in the previous thread. I *think* the -DARDUINO=100 should already be done by the Arduino IDE; I don't use it so someone else will have to comment...
  26. C

    Teensy loader for Raspberry Pi?

    Btw, I have binutils, and am working on building gcc as debs for raspbian. It's not all that slow: maybe 3-4 hours for the gcc build. I'm using a Sandisk Ultra Class6 card. I spent a bunch of time trying to get qemu to work on my mac (there's lots of people on the net doing cross compilation...
  27. C

    New ARM toolchain for Teensy 3.0

    Paul, I tried a couple of my simple programs and they work. Out of curiosity, are you using newlib or glibc or ...? I've been using newlib with gcc 4.8 but maybe there's downsides to that (like I'm noticing implementations of syscalls like _read that are probably not worth taking up space in...
  28. C

    raw hid on linux

    Has anyone successfully used the hid_listen RAW hid serial console on linux? I'm trying to get it to work on a raspberry pi and hot having much luck. It works great on my mac. I've tried the stock 1.0.2-beta 9 code with -DUSB_HID and this test program. #include <stdlib.h> #include...
  29. C

    Teensy loader for Raspberry Pi?

    Does the teensy_loader_cli source on the pjrc web site work with teensy 3.0? It does not list the freescale chip as an option. It compiles fine on the raspberry and the teensy3 shows up in lsusb: but I've tried specifying each of the mcu options and none of them seem to do anything. I think...
  30. C

    Compile GCC for teensy 3?

    Success! After putting this aside for a while I finally came back to it and I have GCC 4.8.0 compiled on my mac and the resulting binaries working on the teensy3. The resulting GCC supports the following mutlilibs: > arm-none-eabi-gcc -print-multi-lib ...
  31. C

    Internal pull up and pull down resistors on teensy 3

    Yeah, this had nothing to do with pull up or pull down. Just a stupid bug. For posterity: the teensy 3 does indeed have both internal pull up and pull down resistors. Both seem to work ok. Put another way: you can either connect the button between ground and the pin and use the internal...
  32. C

    Internal pull up and pull down resistors on teensy 3

    I'm simply trying to drive buttons off digital pins. I have the buttons wired to 3.3V through a 1k resistor and then each button leads to a different pin. I'm then trying to use the internal pulldown to pull the pin down to ground when the button is open (to avoid artifacts as described here)...
  33. C

    Teensy 3.0 and EEPROM usage

    This is old, but for posterity: this thread has the code needed to read the mac address.
  34. C

    Teensy 3.0 - EEPROM writes not persisting through reboot - wierd

    Are you reflashing instead of just rebooting (ie are you pushing the button on the board or just plugging and unplugging)? If yes this is a known issue: the eeprom is actually stored in flash and is wiped by the bootloader. Paul has discussed wanting to change this in the future. If you are...
  35. C

    how can I know what interrupt (edge) I get in teensy 3.0

    I'm basically thinking of something like this in pins_teensy.c: typedef void (*voidFuncPtr)(void); typedef void (*intFuncPtr)(int); volatile static voidFuncPtr intFunc[CORE_NUM_DIGITAL]; volatile static short intFuncArg[CORE_NUM_DIGITAL]; void attachInterruptInternal(uint8_t pin, void...
  36. C

    how can I know what interrupt (edge) I get in teensy 3.0

    So I'm wondering about the same thing: How do I monitor multiple pins and not have to write a separate function for each? I can think of two possibilities here: Modify attachInterrupt so that it (optionally) can pass an argument to the function with the pin number. Only reset the port status...
  37. C

    Timer interrupt, or other way to read SPI consistently on Teensy3.0?

    Nice, thanks for posting your code snippet! -c
  38. C

    Compile GCC for teensy 3?

    I'm trying to basically follow (manually) the build script in the launchpad tree (common file; prereqs file). I configured gcc trunk with: ../gcc-trunk/configure --build=i686-apple-darwin10 --host=i686-apple-darwin10 --target=arm-none-eabi --prefix=/usr/local/teensy --enable-languages=c...
  39. C

    Compile GCC for teensy 3?

    If I wanted to compile a more recent gcc for the teensy 3 what configure options should I use? I'd like to otherwise get as close as possible to what's in Paul's distribution. Thanks, -c
  40. C

    teensy 2.0 and teensy 3.0 question

    This is not the behavior I see. I see that when I plugin the teensy my code runs. I suspect something else is going on. Maybe some timing thing? Can you blink the LED or something to verify that your code is running?
  41. C

    ARM assember code

    I have DMA ADC working as Paul described using two DMA channels (one to read back the conversion result and the other to fire the next conversion). The code is still a bit rough, but there's lots of comments. The biggest challenge is that you have to align the buffer by it's size in order to...
  42. C

    Getting started with raw C: GPIO initialization?

    Do you maybe mean GPIOC_PDDR = 1 << 5; You perhaps know this, but the teensy3 directory will pretty much compile on its own without any of the "arduino stuff" save the compiler. I don't use the Arduino IDE (I'm using AppCode) and I just have a copy of the teensy3 directory in version control...
  43. C

    Timer interrupt, or other way to read SPI consistently on Teensy3.0?

    Have you looked at the periodic interrupt timer (PIT) section of the datasheet? -c
  44. C

    PWM Frequency (was: TimerOne on Teensy 3)

    Wow. That's like > $200 in switch parts if I understand you right. Really cool! Thanks Paul! -c
  45. C

    Cannot get Teensy Loader to work with Teensy 3.0

    The default teensy loader on that page has not yet been updated for teensy 3. Use teensy loader >= 1.0.7. For example from here.
  46. C

    Teensy 3.0 - How many USB end points does it have?

    15. See usb_desc.c usb_endpoint_config_table.
  47. C

    Teensy 3.0 and audio

    The interrupt controller on the teensy 3 is a "nested" interrupt controller which basically means that you can assign configurable priority to interrupts. Only interrupts with a higher priority than the current one can interrupt you. (Somewhat confusingly, in ARM higher priorities are...
  48. C

    Teensy 3.0 serial monitor not working?

    By default the teensy acts like a USB serial device. If you want to use pin 1/2, try using HardwareSerial or Serial1. -c
Back
Top