Show Posts
Pages: [1]
1  Development / Other Software Development / Re: Fast digital I/O, software I2C, and software SPI libraries on: October 08, 2013, 07:00:02 pm
i'll check for pullups too, i'm sure i didn't have them if Wire gave no indication of needing it! HA
2  Development / Other Software Development / Re: Fast digital I/O, software I2C, and software SPI libraries on: October 08, 2013, 06:59:00 pm
I'll check out the nil lib soon.    Further investigation seems to indicate that LiquidCrystal_I2c is LOADED with delay's so i think my problem lies there.    I was able to roll parts of that back and get Wire + LCD to work for now.  sprintf's in my LCD routines may have had some effect, refactoring some of that got me SOME text.     

I'm also using an SPI based LED Matrix AND digitalWriteFast libraries, so i was hoping to kill all those dependencies with one stone!     Are those areas of the nil setup portable as well?
3  Development / Other Software Development / Re: Fast digital I/O, software I2C, and software SPI libraries on: October 08, 2013, 11:15:20 am
Hey SDFat16,

Looking for a little guidance on your libraries.,.  :-)    I'm trying to use the FastI2CMaster on top of Chibios to remove the dependency on Wire.h which Chibios doesn't seem to like.  The I2C will run an LCD, and the code I have is working in a non-chibios environment.   So, i'm working on updating the library i'm using for the LCD .  I'm on Mega2560R3 and i'm trying to run the following:

Setup area of the LCD Lib
#include <DigitalIO.h>
 const uint8_t SDA_PIN = 20;
const uint8_t SCL_PIN = 21;
FastI2cMaster<SCL_PIN, SDA_PIN> i2c;

ok... cool, it creates an instance named i2c..

.. init lcd lib..

.. Trying to phase out Wire ...

void LiquidCrystal_I2C::expanderWrite(uint8_t _data){                                       
//Wire.write((int)(_data) | _backlightval);

i2c.transfer(_Addr| I2C_WRITE,  &_data, 1, I2C_STOP);

It compiles and runs, but doesn't actually DO anything!     Any help would certainly be appreciated!
4  Using Arduino / Displays / Re: LCD Menu library on: December 21, 2012, 05:45:25 pm
I'm kind of wondering how to "exit" the menu..    when i select a menu entry, i want it to execute a callback (which works), then NOT return to the menu.. the callback will change the interface to a "page" of settings - i'm envisioning 4 columns with top row of labels and bottom row of values.     

Otherwise, this is working pretty well..  I also would like to see some kind of input subclassing like phi prompt..   I tried the PHI library, but it also takes Mu control over my app so I'm not really able to accomplish what i want.   Plus the init code in that library is pretty nastyy..   

5  Using Arduino / Audio / Software MIDI Thru "Jitters" on: September 24, 2012, 02:04:41 pm
In the development of my MIDI sequencer, I've decided to expand the MIDI I/O capabilities of my device.    This sequencer received MIDI from a Host (either my pc or anything else that can provide a clock really and hands it straight off to the other devices..   Think of it as a midi hub essentially..  

I started out with a MIDI Thru box like this:

The next logical step was to insert my arduino into the circuit.    I am taking MIDI IN straight from the optoisolator and MIDI OUT goes to the first inverter in the schematic.  This leaves me solely relying on the MIDI libraries thru capabillities.  It seems to work, but intermittently, I get *jitters* in my timing.  That is, the master is sending to my device, but any slaves from the device randomly get offset - like its skipping a timing message.     I've stripped my code back to the very basic and am working with a pretty simple example code (the MIDI libraries example + lcd operations).

I should also note that I'm using DFR's I2c LCD library, which seems to be pretty slow (100ms send operations)..

Any help or discussion on this would be great!
6  Using Arduino / Programming Questions / Dear Arduino Ninjas, help improve my Monome-esque MIDI sequencer code.. on: August 02, 2012, 09:19:07 pm

 I've been working on a project for a little while now.   Its a monome-esque midi sequencer..   Arduino Mega 2560..  2 Sparkfun buttonpads form an 8x4 grid representing 2 bars of 16th notes.   The keypad scanning is done by 74x164/165..  the RGB LED Matrix is handled by shiftMatrixPWM from Elco Jacobs (4 x 74x595s here).   An I2C 20x4 LCD w/ DFRobots library shows 8 parameters.. The params adjustable by 8 encoders (they have switches which i'll later use to cycle thru parameters) and the UI is rounded out with one more encoder/sw, 4 "arrow" buttons and 1 select button (all scanned by 74x165).   Additionally, I've added 24lc256 to give it some extra space for saving patterns later..

Heres an photo if interested :

So basically, I've got my code all up on gitHub and i can certainly answer any questions (especially since i haven't drawn a schematic yet) Included in there is a variety of test sketches used throughout the development..

So, I've got it all pretty much working..  it receives clock from another midi device (in my case, my korg electribe), and starts counting away and sending notes, all the while scanning the shift registers and pushing info out to the LED Matrix..   I'm running into a few problems

1) Lag between notes, I've done some crude testing and I think the problem lies in the LCD updating
2) Help tightening up the loops around the encoders / nav / keypad
3) a better way to handle the encoders / UI overall?
4) ShiftMatrixPWM uses an timer to service the LED Matrix - I'm sure this has something to do with my speed issues
5) I want to add the ability for it to act as the master midi clock but with the general power required to service the UI, I'm afraid i'll have EVEN WORSE TIMING then!
6) Is it worth adding a second arduino to service some of these UI bits or even act as a seperate "midi interface"?   I've got an Uno laying around..  :-)

Any and all help is welcome, interested to see what the community says.  

7  Using Arduino / Installation & Troubleshooting / Re: Mega 2560 Upload Failing in my circuit! on: May 18, 2012, 11:17:58 pm
maaaaan..     i turned on verbose logging during build and upload and found the stk500 timeout..   

this wound up fixing it:,83079.15.html

basically using AVR folder from 0023..   

8  Using Arduino / Installation & Troubleshooting / Mega 2560 Upload Failing in my circuit! on: May 18, 2012, 10:55:38 pm
I've spent most of my day googling, testing, reading forums, etc..  So now I turn my question to the public. 

I've got a 2560 that i'm using to build a MIDI Sequencer.  Things have been going well until i got my circuit fully off my breadboard.   
currently, it refuses to program whilst in the circuit.    NO, ITS NOT THAT TX/RX 0 ARE IN USE!

I'm currently using the following pins:

A8-15 as digital
SDA/SCL send data to a group of 74HC595's..
49 - latch for another set of 595's
51/52 - Data for the 2nd set of 595s..   

My circuit is working great, and I'd been programming with my "shield" attached as I was prototyping.   I rearranged the pin configuration to the current setup which is when it stopped working..   Out of the circuit it works great - its just not very "rapid" having to constantly unplug and replug the shield.   

I've tried the reset thing..  no dice..

Initially, i thought it was because i was using 53 instead of 49 (apparently thats linked into SPI somehow)..

9  Using Arduino / LEDs and Multiplexing / Re: ShiftPWM support topic. Latest update: Support not using the SPI on: May 09, 2012, 09:14:39 pm
so, to clarify.   It's my understanding that with SPI, i can use the same 3 serial lines (clock, latch, data) - but address them via "Slave Select" (OE on the 595? )   

This would mean that instead of using 6 pins total to drive my matrix, i could reuse the same serial lines, but use slave select to "address" data to either the RGB or the Blanking SR's. Giving a total of 5 pins.

This gets more interesting because i want to add 164/165 to decode my keypad.  Also SPI devices - so i'd use 2 more pins (or a 2 to 4 decoder) to be able to now address 4 seperate SPI "busses" - RGB / Blanking / Keypad Out / Keypad in.   

On top of that, my last point was that I was just wondering why the matrix version could not have all 4 SRs on one SPI rather then 2 seperate.. 

is that any clearer?
10  Using Arduino / LEDs and Multiplexing / Re: ShiftPWM support topic. Latest update: Support for different setups than RGBRGB on: May 09, 2012, 02:08:32 pm
quick question.. 

So, i'm running the matrix version and mostly having luck..   I'm using a led matrix / keypad..   so, i'm going to use 74hc164/165 to scan the key matrix.    being an SPI device, I'd like to use the same SPI bus, but I'm thinking i'll have to tweak the schematic (and maybe code) a little to allow it to address each spi line..    does that sound right? any insight there?

Furthermore, any thoughts of putting the "blanking" shift register on the same chain as the RGB SRs?
11  Using Arduino / LEDs and Multiplexing / Re: ShiftPWM support topic. Latest update: ShiftMatrixPWM needs testing on: May 05, 2012, 04:22:50 pm
I was thinking some bit sorta functions would be cool..  invert, etc..   
12  Using Arduino / LEDs and Multiplexing / Re: ShiftPWM support topic. Latest update: ShiftMatrixPWM needs testing on: May 05, 2012, 04:04:39 pm
@elco - so is that RGB,RGB,etc from 0-7 of the first thru 3rd 595s?   

@ematson, i'd love to check those out too!
13  Using Arduino / LEDs and Multiplexing / ShiftMatrixPWM Help on: May 01, 2012, 06:09:54 pm
I'm testing out shiftMatrixPWM with a SparkFun 4x4 LED Button Matrix and i'm at wits end..  I've googled pretty much all day, and read all over the forums, etc.. 

So, I've got a common cathode RGB Matrix - 4x4 like i said.    I've run ShiftPWM and I guess it was working..   So I moved on to Matrix - From what I understand, you've added a single SR on pins 6,7,8 which should be responsible for row selection.    So, I've got one 595 on 6,7,8 which is going to my GND's and three daisy chained on 9,11,13 which drive one color each..   sound right?   

I've set invertColumnOutputs to 0 and invertRowOutputs to 1 and set numColumnRegisters to 3 and numRows to 4.  Is that right as well? 

The example pretty much runs, i expected the one by one function to do a single LED, but its doing a column..  It just doesn't seem right..

setOne seems to allow me to change each pixels color..   eg, 0,0 - 0,1 - 0,2 show a single pixel.. and i can manipulate single pixels around the board, but when i use setGroupOf3 to try to set rgb in one call, it doesn't seem to be in the position i'm expecting.. 

HELP!  :-)  TIA
Pages: [1]