Show Posts
Pages: 1 ... 5 6 [7] 8 9
91  Using Arduino / LEDs and Multiplexing / Re: Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 02, 2012, 01:15:51 pm
One more thing Crossroads,

I watched your display on the youtube video...

The  "Howdy do boys? This ones for you"

where was that in your code?
92  Using Arduino / LEDs and Multiplexing / Re: Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 02, 2012, 12:26:59 pm
Crossroads,

Man I would love to know what you mean by

byte ss0 = 10; //MSB
byte ss1 = 9;
byte ss2 = 8;
byte ss3 = 7; // LSB


I realize on the Uno board you have SS is pin 10  but pins 9, 8, and 7 aren't SPI pinouts...

I know the MSB and LSB = Most and least significant Bits.....

so heres a guess I'll throw out there....so for the Mega 2560  SS is pin 53.  so we know this:

SPI pin outs used for this on the Mega 2560 are: SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS)   



so if i were to wire it up and define the pinMode as:

ss0 = 53 // MSB     
ss1 = 49     
ss2 = 48   
ss3 = 47  // LSB          (because 52 -50) are the other SPI pinouts needed....

would that work?
93  Using Arduino / LEDs and Multiplexing / Re: Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 02, 2012, 11:10:50 am
Ok with your code...you have:

byte ss0 = 10; //MSB
byte ss1 = 9;
byte ss2 = 8;
byte ss3 = 7; // LSB


now on the mega2560   SS is pin 53     so what does the above mean?
94  Using Arduino / LEDs and Multiplexing / Re: Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 02, 2012, 11:00:51 am
Ya in my previous posts, I realize the SPI pinouts just need to be changed since I am using the Mega 2560.. (No worries on that, I know the pinouts for SPI)

When I said cascaded, I just meant   Arduino -> data in Max7219   data out  ->  data in Max7219   data out  ->   

and so fourth like in this playground site:

http://www.arduino.cc/playground/Main/MAX72XXHardware#Wiring

I have an enclosure with the 8 x 32 display, a 40 x 2 LCD, a reset and an up down button for "volume control" I wanted to make it like a speaker type box with lots of lights / displays...I will take a video and show it to you soon....

all thats left is getting this SPI integration right....I am working on the PCB layout of the Max7219s right now....
95  Using Arduino / LEDs and Multiplexing / Re: Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 02, 2012, 05:47:27 am
Crossroads, I've seen many of your posts before helping others with this concept. I actually downloaded your code once before but as I interpret it, it seems you have an UNO or a duelminove. I'm using a mega 2560 so I'm having to manipulate it correctly. But basically I have the max7219s correctly wired in....I just haven't uploaded code yet because the the mega is running many more things right now as well so I'm needing to integrate code together. I wanted to make sure any 8 x 32 code will work first. Is the YouTube video below your project?  Thanks again......the playground site I posted above on the max7219 is just like the block diagrams you drew before too.
96  Using Arduino / LEDs and Multiplexing / Re: Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 01, 2012, 03:07:23 pm
The smiley face was suppose to be  8     )
97  Using Arduino / LEDs and Multiplexing / Scrolling text on LED matrices using SPI and arduino Mega2560 on: November 01, 2012, 02:49:29 pm
Hey guys,

Ok, so I am trying to wire up 4  (8 x smiley-cool LED matrices  = 32 x 8 ok.

I am off to a great start...I have the Datasheet for the Matrix so i know the Rows and columns..

and I'm basing it off of the MAX7219 (I have 4 of those - 1 for each matrix)

I'm wiring it up via this site:

http://www.arduino.cc/playground/Main/MAX72XXHardware#Wiring

and with the Mega 2560, using the SPI library, we would use these pin outs:

// SPI pin outs used for this on the Mega 2560 are: SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS)   

// We just need to use SCK - pin 52  MOSI - Pin 51 and SS - pin 53

// MOSI (Arduino) = Serial Data Out from Arduino (Asynchronous ~ Series) to Serial Data In (MAX7219)

// SCK (Arduino) = CLK (MAX7219)

// SS (Arduino) = Load (Synchronous ~ Parallel ) on MAX7219

// The 4 MAX7219s will be cascaded


I have seen a lot of code for scrolling text, but it seems like everyone uses the old LedControl or Matrix libraries..I just want to keep it simple and use the SPI library.


Can any coders out there give me a jumpstart help on the array to maybe just scroll "Arduino" across the matrices?

so for starters:


# include <SPI.h>

// SPI pin outs used for this on the Mega 2560 are: SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS)   

// We just need to use SCK - pin 52  MOSI - Pin 51 and SS - pin 53

// MOSI (Arduino) = Serial Data Out from Arduino (Asynchronous) to Serial Data In (MAX7219)

// SCK (Arduino) = CLK (MAX7219)

// SS (Arduino) = Load (Synchronous) on MAX7219

// The 4 MAX7219s will be cascaded


void setUp ()


{

    ...what could go here?

}

void loop ()

{
      ....what could go here?

}
98  Using Arduino / Project Guidance / Re: Using MCP4131 digital potentiometer to adjust volume of a speaker on: November 01, 2012, 12:56:25 pm
I am trying to work on a similar project but I'm using ther Mega2560 to have more outputs for other circuits to be integrated.....so anyhows...with the PWM of the LED you mentioned, you realize an LED is lit off of DC right in this type of project. The speaker would need to be controlled via some type of amplifier circuitry like an LM386 or LM358.

I am trying to use the DS1803 dual Pot.

Still researching on it though.....I found this on Embedded-lab.com using a PIC, but obviously I want something with Arduino..


http://embedded-lab.com/blog/?p=2967

99  Using Arduino / Displays / Re: Increment and decrement with two push buttons using LCD and arduino Uno on: October 26, 2012, 01:32:23 pm
Thanks to both of you....I used both of the information given...my code now is shown below...


Its working...I just have to tweak it a little with some delays etc...



#include <LiquidCrystal.h>


LiquidCrystal lcd(7,8,9,10,11,12);



const int  buttonPin = 5;    // the pin that the Up pushbutton is attached to

const int  buttonPin1 = 6;    // the pin that the Down pushbutton is attached to

 
// Variables will change:


 int buttonPushCounter = 0;   // counter for the number of button presses
 int buttonState5 = 0;         // current state of the button
 int buttonState6 = 0;         // current state of the button
 int lastButtonState = 0;     // previous state of the button

 
void setup() {


  // initialize the button pin as a input:
   
   pinMode(buttonPin, INPUT);
   
   pinMode(buttonPin1, INPUT);
   
   
   lcd.begin(16,2);
   
   lcd.setCursor(0,1);
   
   lcd.print("Volume:");
   
 }
 

void loop() {
 
 
   // read the pushbutton up input pin:
   
   buttonState5 = digitalRead(buttonPin);

  // compare the buttonState to its previous state
 
   if (buttonState5 != lastButtonState) {
     
     // if the state has changed, increment the counter
     
     if (buttonState5 == HIGH)
     
     {
       
      buttonPushCounter++;
      lcd.setCursor(7,1);
           
      lcd.print(buttonPushCounter);
     }
     
      delay(50);
 
   }
   // save the current state as the last state,
  //for next time through the loop
   lastButtonState = buttonState5;
   
     // read the pushbutton down input pin:
   
   buttonState6 = digitalRead(buttonPin1);

  // compare the buttonState to its previous state
 
   if (buttonState6 != lastButtonState) {
     
     // if the state has changed, decrement the counter
     
     if (buttonState6 == HIGH)
     
     {
       
      buttonPushCounter-=1;
      lcd.setCursor(7,1);
         
      lcd.print(buttonPushCounter);
     }
     
         delay(50);   
         
         
         if (buttonPushCounter < 10)
         
         {
             lcd.setCursor(8,1);
         
              lcd.print("  ");
         }
         
         
         if (buttonPushCounter <= 0)
         
         {
           
           
            lcd.setCursor(7,1);
           
            lcd.print("OFF");
           
         }
         
         
         
         if (buttonPushCounter >= 25)
         
         {
           
           lcd.setCursor(7,1);
           
           lcd.print("Max");
           
         }
         
       
   }
   
   
   // save the current state as the last state,

  //for next time through the loop

   lastButtonState = buttonState6;
   
   
}
100  Using Arduino / Displays / Re: Increment and decrement with two push buttons using LCD and arduino Uno on: October 26, 2012, 11:53:29 am
I just can't get over how easy this seems but its kicking my ass......I mean, I have the BUtton state and all that...and with the ++ it works great incrementing...I even took the wire from the other button I'm trying to use as the 'Down counter" and it make the count go up...so somewhere in my code there needs to have some "--" decrementing, but I can't figure it out...hardware is good...its my code I need to fix....somebody out there has got to know..
101  Using Arduino / Displays / Re: Increment and decrement with two push buttons using LCD and arduino Uno on: October 26, 2012, 11:31:28 am
Please somebody help.....I have been racking my brain over how easy this is suppose to be but everything I try doesn't work
102  Using Arduino / Displays / Re: Increment and decrement with two push buttons using LCD and arduino Uno on: October 26, 2012, 09:37:55 am
Just looked at my schematic......the pull up resistors are tied to high but they are connected to GND here....disregard that mistake....
103  Using Arduino / Displays / Increment and decrement with two push buttons using LCD and arduino Uno on: October 26, 2012, 09:35:40 am
Hello Guys,

I am trying to configure first an Up and down or increment and decrement control for a display to show a "Volume" increasing by one or decreasing by one....I have attached my schematic and code...I can get the "Up" count working but then I tried some  "--" in my code and it didn't work..Please help....

Here is my code:


#include <LiquidCrystal.h>


LiquidCrystal lcd(7,8,9,10,11,12);



const int  buttonPin = 5;    // the pin that the Up pushbutton is attached to

const int  buttonPin1 = 6;    // the pin that the Down pushbutton is attached to

 
// Variables will change:


 int buttonPushCounter = 0;   // counter for the number of button presses
 int buttonState = 0;         // current state of the button
 int lastButtonState = 0;     // previous state of the button
 
void setup() {


   // initialize the button pin as a input:
   
   pinMode(buttonPin, INPUT);
   
   pinMode(buttonPin1, INPUT);
   
   
   lcd.begin(16,2);
   
   lcd.setCursor(0,1);
   
   lcd.print("Volume:");
   
 }
 

void loop() {
 
 
   // read the pushbutton input pin:
   
   buttonState = digitalRead(buttonPin);
   
   
 
  // compare the buttonState to its previous state
 
   if (buttonState != lastButtonState) {
     
     // if the state has changed, increment the counter
     
     if (buttonState == HIGH)
     
     {
       
      buttonPushCounter++;
      lcd.setCursor(7,1);
     
      lcd.print(buttonPushCounter);
     }
     

 
   }
   // save the current state as the last state,
  //for next time through the loop
   lastButtonState = buttonState;
 

}


schematic attached
104  Using Arduino / LEDs and Multiplexing / Re: 8 x 32 display on: October 01, 2012, 10:01:43 pm
Yes the SPI pinouts make sense, but I just wasn't too sure about the asynchronous data in the max7219 and synchronous SPI inputs to them. Thanks for the direction
105  Using Arduino / LEDs and Multiplexing / Re: 8 x 32 display on: October 01, 2012, 01:57:44 pm
I am currently trying to build a similar project. I have 4    8 x 8 LED matrices but once aligned up next to each other it makes the 32 x 8 layout.  I am thinking of going with the Mega 2560 on this project so I can have more outputs......But I am running out of referneces when it comes to the wiring it all up......I know 74595 are not very efficient. I found this site on arduino tutorial:

http://arduino.cc/en/Tutorial/ShiftOut

But this isn't the first time I've seen the info on the Maxim7219...Check this site here:

http://www.planetarduino.org/?cat=435

But Like I said I'm trying to cascade it all so it can drive 4 matrices......I'd like to make an audio analyzer like this guy has here:



Does anyone know how to hook them up as a cascaded row  ????/  Just 4  8x8  LED matrices...

I have the data sheets on the rows and columns and such..I just want to be able to know if this is correct
Pages: 1 ... 5 6 [7] 8 9