Go Down

Topic: ATmega1284P: End to End using 1.0 IDE (Read 81258 times) previous topic - next topic

bamboosam

I have tried it with my PCB / smd 1284p and also with my DIP package on a breadboard. They both have the same issue

CrossRoads

So that's like physical pin5 on the chip? The SPI default SS pin?
You don't have SPI enabled after you set the pin as an input, do you?
That would set it back to an Output as far as I know, and odd things could happen.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

bamboosam

Hmm... My setup is running an led strip which the library to control it uses SPI, pins SCK and MOSI...


bamboosam

hmm... Ok so it still doesn't work even if I set is as OUTPUT.

If I just dont set it to anything it does work...lol

CrossRoads

Read the data sheet - SS pin has to be set to Output for SPI operations when the device is the Master.
Set it to OUTPUT before SPI.begin() is called.
I've never seen problems when using it that way.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

bamboosam

Works!!!  XD Seriously CrossRoads if I could give you a hug I would! lol You have successfully helped me with every issue I have had during this crazy microcontroller roller coaster. For being totally kick ass, when this hoop is done I am giving you one, and I don't care if you hulahoop or not, you are going to have the world sickest most artistic well thought out just awesomenest lol hulahoop in the world.

Thanks for all the help man. And super fast response, I wanted to get this thing ready for a show tonight.

bamboosam

https://www.facebook.com/pages/LED-Artistry/389983651023734 You are gonna rock one of these! lol

CrossRoads

I look forward to it!
As for timeliness, sometimes  you get lucky - I just happened to have a couple minutes between meetings and was poking around ...
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

bamboosam

I very much appreciate it, that would have taken me forever to figure out

CrossRoads

You'll have to send me the camera settings you used for pictures too...
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

bamboosam

I used an older SLR cannon, and adjusted the shutter speed to 1.25... I am not sure as to what the 1.25 means.

bamboosam

For anyone who ran into this issue, using SPI but need to use SS as input for a button.
You don't have to set is as input, before or after SPI();

Set if LOW before reading: Then set it back HIGH after you read the button state.

  digitalWrite(4, LOW);
  PushTwoR = digitalRead(4); // ;)
  digitalWrite(4, HIGH);

florinc

Madhu,
Quote
I am trying to use the Arduino 1.0 IDE's SoftwareSerial library with an ATMEGA1284P; on physical pins 24 and 25 (pins 18 and 19 in pins_arduino.h for the standard variant) and I see that I cannot receive on pin 24(18). However, I can transmit successfully on pin 25(19).

After research, I now understand that I need to use pins that support 'change interrupts' - which pins on the 1284P support that?

Pin 24 and 25 support change interrupts, according to datasheet.
Did you fix the problem with SoftwareSerial on 1284?

baselsw

Got a question: Is the ATmega1284P bootloader (Mighty 16Mhz optiboot) compatible with the Arduino USB Serial Light adapter?

Go Up