Search results

  1. N

    New I2C library for Teensy3

    Existing i2c_t3 doesn't support continuous spooling of data into the transmit buffer. It's probably not that difficult, but it would require some low level modifications. To transmit data which exceeds the buffer size would require a customized transmit and ISR routine. Transmit would need...
  2. N

    New I2C library for Teensy3

    I would expect if you reinstall Arduino over the same files it will overwrite the link with the Wire.h file. There are many variations of this idea, including altering the contents of the file, or the file itself with a link as suggested, or somehow altering the build system. But they don't...
  3. N

    New I2C library for Teensy3

    To use this library you need to use #include <i2c_t3.h>, not #include <wire.h>. The example files that are included demonstrate usage.
  4. N

    New I2C library for Teensy3

    Sorry, I don't have anything running on T4 at the moment. I acquired some parts, but I haven't had time to work on it. For now you will have to utilize the Wire library.
  5. N

    New I2C library for Teensy3

    The 5us high/low is correct for 100kHz rate. 4.7k is a good value. It really looks like Slave clock stretching, but that is quite a long duration. I'm not sure why it would not respond to some commands. If you have a different Slave, particularly a different device type, I would suggest...
  6. N

    New I2C library for Teensy3

    Those delays should not be caused by the Master. Ignoring the SCL delay, when the bytes transmit, what is the SCL toggle speed? That would be the Master-side clock. I'm not sure why the hold times with SCL low would occur. Perhaps try getting the Master to talk to a different Slave device...
  7. N

    New I2C library for Teensy3

    I'm not sure what else to suggest. Other displays I've used generally scale with transmit speed (but they were graphical, so I2C was the bottleneck for moving frame data). Perhaps that display has a processor that controls/limits the speed. Another possibility is that the host program is...
  8. N

    New I2C library for Teensy3

    It's an interesting idea, but I suspect it is a bit more complex than it seems. On the Slave end, the code would run as part of the ISR. The code you show has elements that seem right, but overall it seems off. It would need to work similar to the onReceive() callback. In a generic sense...
  9. N

    New I2C library for Teensy3

    Thanks for the feedback. I'll probably investigate it, but I have no idea when I could get something out.
  10. N

    New I2C library for Teensy3

    I don't quite follow your question. On Master-side the resetBus function will take I2C off the pins for a moment, manually send some clocks down SCL to release any stuck slaves, and then reconnect I2C. In this case you are talking about having a slave swap I2C off the pin and then holding SCL...
  11. N

    New I2C library for Teensy3

    You'll have to supply a link to your library you are using. Other than that it is guessing. Using google I can see a DigoleSerial.h lib at: https://github.com/phalpern/Thermostat/blob/master/DigoleSerial.h That one has a very generic init for I2C config: _myWire->begin(); That may be giving...
  12. N

    New I2C library for Teensy3

    It depends. Mostly any speedup will depend on the slave device and if it will respond well to faster than normal I2C speeds. I've gotten faster than normal communication working on something like a SSD1306 I2C display (like the cheap ones on ebay...
  13. N

    New I2C library for Teensy3

    Also to anyone following this thread - in regards to Teensy4: I was offered a T4 beta board back when it started, but I could not accept as I did not have the requisite time to work on a library port. I have now obtained a couple of the retail boards, and although I still lack time, I will...
  14. N

    New I2C library for Teensy3

    This thread is still correct for problems involving this library. I am unfamiliar with DigoleSerialDisp library. It may work by simply swapping the include line: #include <i2c_t3.h> instead of #include <Wire.h> But it must be done in all places in the code, including in the DigoleSerialDisp...
  15. N

    New I2C library for Teensy3

    Edit by proxy is a bit too cumbersome. I think at this point just edit the top post so it refers all future updates/downloads to GitHub (there is already a link at the top of first post, just emphasize that is the download location). All the description and API is still current, so that info...
  16. N

    New I2C library for Teensy3

    All - I uploaded a new release on GitHub: https://github.com/nox771/i2c_t3 It applies some fixes and changes the license to MIT. I would edit the top-post accordingly, but for some reason the edit button has disappeared, and I can no longer modify it (anyone know what that is about?)
  17. N

    Teensyduino 1.44 Released

    For next TD version, please pull new release of i2c_t3 here (tagged 'v11'): https://github.com/nox771/i2c_t3 Changed license to MIT and applied some fixes.
  18. N

    New I2C library for Teensy3

    You cannot include both i2c_t3 and Wire libs in the same project because they define the same objects. If you want to use i2c_t3, you need to replace all #include <Wire.h> with #include <i2c_t3.h> including any sub-libraries that use it, for instance inside the Adafruit_SHT31.h file.
  19. N

    New I2C library for Teensy3

    Back when I first started the lib the code was based on whatever Wire was in Teensyduino at the time, which was listed as LGPL, that is why it uses LGPL (IIRC Arduino Wire has a LGPL header). However since then about 95% of it has been rewritten, so it could maybe be changed. I would have to...
  20. N

    conflicting declaration 'i2c_t3 Wire'

    The problem is likely that you are using the Adafruit_MCP23017 library, which since it uses I2C, you will need to make sure inside that library to change Wire.h to i2c_t3.h also. If the Adafruit library tried to include Wire.h and your sketch includes i2c_t3.h they will collide. Edit: didn't...
  21. N

    New I2C library for Teensy3

    Ah, I have an idea of what it might be. Change your downloaded dir name from "i2c_t3-master" to "i2c_t3". Teensyduino ships with i2c_t3 by default, so it will pick that one first unless you have one in libraries (like you do). But it will only take the one from libraries if the dir name...
  22. N

    New I2C library for Teensy3

    There seems to be some conversions between signed and unsigned types going on. Try first working exclusively with unsigned types, and avoid int if possible. The original Arduino Wire lib annoyingly uses int, which is signed 16-bit, for what is fundamentally an unsigned 8-bit operation (uint8_t)...
  23. N

    New I2C library for Teensy3

    Increasing the buffer sizes should work. 258 bytes sounds correct for the default buffer size, as 1st byte is used for slave address. Are you using size_t as your index? If you use uint8_t as a count (perhaps elsewhere in code) it will limit at 255 (due to 8bits). You will have to provide...
  24. N

    New I2C library for Teensy3

    The library error tracking functions do not log addresses (it is more of an error "counting" system instead of an error "logging" system). This is really the only way to do it since a true error log could use an indeterminate amount of space. User code could augment the onError() callback to...
  25. N

    New I2C library for Teensy3

    All, I uploaded a v10.1 release on GitHub and the top-post. This has a fix for a subtle priority escalation bug involving nested Wire calls inside callbacks (refer to: https://github.com/nox771/i2c_t3/issues/14). There is now a user #define (I2C_DISABLE_PRIORITY_CHECK) to disable the checks...
  26. N

    New I2C library for Teensy3

    Yes each bus has its own callback functions. There is a subtle priority escalation bug if you try doing Wire calls inside the callback, as described here: https://github.com/nox771/i2c_t3/issues/14 The fix is known, I just need to get it out. I'll try to work on it sometime today.
  27. N

    New I2C library for Teensy3

    You can provide handling or not for unneeded addresses. Usually it is not a problem (since nothing talks to those addresses anyway). But something like that should work for emulating multiple slaves. At one point I had made a composite slave device like this, but I can't find the sketch.
  28. N

    New I2C library for Teensy3

    You can make a Slave respond to a range of addresses, and then determine which one was addressed using the Wire.getRxAddr() function. If you look at the basic_slave_range example it shows something like this. So for instance, to make slave respond to addresses 0x35, 0x38, 0x3F, you could do...
  29. N

    New I2C library for Teensy3

    You don't use those functions to determine if the buffer is empty, instead use Wire.available(). Those functions exist because at a hardware level the I2C moves data in bytes, so it is natural to manipulate data in bytes. The original Wire lib tried to mash two functions together by...
  30. N

    Teensyduino 1.40 Released

    Hello, for the next TD release please pull i2c_t3 off GitHub again. It had a big update which is described here: https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3?p=157187&viewfull=1#post157187 Unless I'm missing something this should make it compatible to the standard Teensy...
  31. N

    New I2C library for Teensy3

    GC is one of several things that are lacking, but unfortunately at the moment I'm out of time, and it might be a while before I can look into it. I can add this as a future to-do.
  32. N

    NXP nears deal for Freescale Semiconductor

    If the regulators are worth a damn at all they should block a Broadcom / Qualcomm deal. Putting those two together (with all of their sub-acquisitions) consolidates a large amount of wireless chip IP into a single company. Just a day or two ago Hock Tan was in the news for moving Broadcom's HQ...
  33. N

    T3.5 LCD and RTC on I2C - lock up

    Things to try: 1) Try putting a delay on the startup code prior to the Wire commands. If RTC holds SDA/SCL low during powerup it could hang the Wire commands (I'm not sure how default Wire lib handles bus busy condition). 2) Reorder the LCD commands so they occur first in init. If they are...
  34. N

    MK20DX256VLH7 out of stock EVERYWHERE??

    What it looks like is the 64LQFP package is out everywhere (Mouser has 8500 on order at end of Feb - otherwise lead time is now showing 39 weeks). However there is some stock on bigger QFPs and BGA packages (some with varying flash/ram levels). Largest stock seems to be 121 BGA. Unit price is...
  35. N

    i2c slave controller for multiple slave arduino/teensies

    A couple FYI's - 1) I ran into a similar bug on earlier i2c_t3 code, which is now fixed. This is caused by the STOP interrupt code, which probably needs fixing on Wire. IIRC, the interrupt triggers on the last byte, and then again on the STOP condition, which causes it to double count the...
  36. N

    New I2C library for Teensy3

    All, I've uploaded a new v10.0 library to the top post and GitHub. Documentation has been updated. This has passed all my testing but it is a pretty involved change in some parts, so post here if you have any problems with it. There are three major changes (first three below), and some extra...
  37. N

    Maybe a Linux build problem - redefinition errors

    Just FYI - I'm going to be working on a significant update soon, and I'll try to add this in (but it will probably be a more generic error logging as discussed a long time ago - when it gets closer I might discuss form in i2c_t3 thread). I'm going to add in a few other requested things, so it...
  38. N

    New I2C library for Teensy3

    sendRequest() will background a transfer, but it is correct you will need to poll or periodically check done() or finish() to know when the transfer is complete. The expectation was this is something that would be done at the end of a main loop iteration or similar. I suppose in the future I...
  39. N

    Teensyduino 1.40 Beta #1

    Paul, please pull a new i2c_t3 off GitHub again for next TD version. There were some more fixes on the LC/3.5/3.6, details: https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3?p=155146&viewfull=1#post155146 Here is the link: https://github.com/nox771/i2c_t3
  40. N

    New I2C library for Teensy3

    All - I've uploaded a v9.4 release to the top post and GitHub. A couple other bugs showed up involving RepSTART into Slave ISR on LC/3.5/3.6. Changes are: Fixed Slave ISR for LC/3.5/3.6 not properly recognizing RepSTART Fixed nested Wire calls during Slave ISR receive (calling Wire inside...
  41. N

    new problem with start/stop interrupts with IntervalTimer

    Possibly because you are doing pass by value instead of pass by reference. Try changing the function arguments to references: void IntOn(IntervalTimer& actTimer) {
  42. N

    New I2C library for Teensy3

    This looks like a problem in the build system, not in the source code. It seems to be trying to link in default Wire lib (WireKinetis.cpp.o) at the same time as i2c_t3, which won't work because they define the same things. I don't have experience trying to use Arduino build system in linux...
  43. N

    MK20DX256VLH7 out of stock EVERYWHERE??

    There are a few out there, mostly places I've never dealt with (click "show all"): https://octopart.com/search?q=MK20DX256VLH7+
  44. N

    Teensyduino 1.39 Released

    I merged this. GitHub and forum download are updated.
  45. N

    Teensyduino 1.39 Released

    Just FYI, please pull a new i2c_t3 release to include for your next TD version. There have been a few bug fixes since the version included in TD 1.39. Here is the link: https://github.com/nox771/i2c_t3
  46. N

    New I2C library for Teensy3

    Just FYI - I've uploaded a v9.3 release to the top post and GitHub. It fixes a Slave-mode bug in the ISR for LC/3.5/3.6 devices (STOP bit not properly triggering callback). Try the update if you have any problem running that configuration. Edit: Just re-uploaded to merge Paul's Teensy 2.0...
  47. N

    Raspberry Pi Hardware

    Just a thought, but if you had a RPi3 with WiFi, and you had a NFS disk (from other Linux machine, or NAS server) you could build on the remote disk and prevent burning out the SD card.
  48. N

    FPGA for beginners ?

    I got one of these DE0-Nano boards a long time ago. I never got a chance to get into it, but I liked the form factor (0.1" headers) and it seemed to be reasonably capable. Not too expensive either. It is an Altera Cyclone IV board. It is $80 from Terasic (maker of the board - they have a...
  49. N

    Bringing Projects Through Airline Security

    I've always wondered what kind of fun would happen if you tried bringing a case like this through the airport: http://www.bit-tech.net/reviews/modding/wmd_part2_g-gnome_case_mod/1/ It's so stereotypical, like in a Bond movie. They would probably lock down the airport and evacuate the city.
  50. N

    New I2C library for Teensy3

    Internally the library maintains its state through several variables in the i2cStruct (refer to i2c_t3.h file, and look for i2cStruct, then "Current" variables). There are functions to access some of those, but i2cStruct is public, so any setting can be read from it at any time (eg...
Back
Top