Loading...
  Show Posts
Pages: [1] 2 3 ... 16
1  Using Arduino / Microcontrollers / Re: Arduino Leonardo Communication issues on: May 17, 2013, 02:51:14 pm
Thank you will check it out  smiley
2  Using Arduino / Microcontrollers / Re: Arduino Leonardo Communication issues on: May 17, 2013, 01:24:41 am
Thanx for that info  smiley
But where in the arduino folder is this exception written into?? I am not able to find out where.
3  Using Arduino / Microcontrollers / Arduino Leonardo Communication issues on: May 16, 2013, 03:29:56 pm
Hi,
This is kind off a continuation of this thread http://forum.arduino.cc/index.php?topic=162752(in a way its not thought it would be better to start off a new one). I am trying to develop a new Atxmega128a3u board(Preferably arduino compatible). Now the board is ready and I was able to bootload it with JTAGICE3 and I was able to do blinky program with Atmel studio 6. I was able to upload it via flip and its working fine. smiley

Now since this is not arduino compatible, I wanted to know how I would do USB communication between PC and uC. (Same as the serial.print in arduino terms). I asked this here because, ATXmega128a3u also uses native USB communication as Arduino leonardo. Doesnt Leonardo virtualizes a serial communication over USB? I wanted to know how it does that and where this exception is handled in the Arduino codes because all other boards work via UART and Leonardo works via native USB. (and it uses same Serial commands to do it in Leonardo and)
Can anyone tell me how(and where) this is done in Leonardo? If I can figure that out I might be able to do that same thing with Atxmega128a3u.
4  Using Arduino / Microcontrollers / Re: Atxmega Series development on: April 28, 2013, 12:03:03 am
@Coding Badly Thanx for the info  smiley
I am definitely going to take a look at those after this week smiley (Finals coming up this week..)

Since those guys have ported it might give that a go..
Quote
• Webroot identified one threat in the download: .\arduino-1.0.1-windows-x\arduino-1.0.1\hardware\tools\avr\utils\bin\info.exe but Webroot has a tendency to generate false positives
Thanx for the headsup smiley-wink

@westfw
Xmegaduino. I have seen it online(Couldn't go through it in detail though). Will give it a go soon...
Quote
about the only advantage of xMega is the 32MHz clock rate, which is pretty much "not compelling" for the effort required for a new core and new hardware (especially since ... ARM!)  (ok, "big" xMega chips are now running lower cost than big MEGA chips...)
Built in DACs, 32Mhz, 128KB Flash memory, sufficient I/Os and I think its cheaper than ATmega2560. So thats what got me interested in this at the first place.

What I had in mind is something like a small portable oscilloscope with the Atxmega. But what happened was that a bit of googling made me land up on this http://www.gabotronics.com/development-boards/xmega-xprotolab.htm 
smiley-sad  Kind of exactly what I had in mind(Except the display) smiley-sad
Its kind of hard to innovative these days. smiley-sad

Any ideas on something similar which I could improve/work upon on this?


5  Using Arduino / Microcontrollers / Re: Atxmega Series development on: April 27, 2013, 01:28:40 am
@Coding Badly Thanx for the tips smiley

Quote
• pinMode is always first.  digitalWrite is always second.  digitalRead is always third.  millis or delay is always fourth.  With those four functions you have the ability to perform crude debugging.  If possible, Serial is next.

So it should basically be just re assigning of pins right? (I know you might not be able to answer unless you go through the datasheet properly)
My question is where do I edit these parameters from? (Sorry if I am being naive about it) 

Finally I may not actually port it because I think people have already ported it here.
 http://www.obdiiworld.com/xaduino/Xaduino-Manual.pdf
(Did anybody on this forum did the above porting?)
I just wanted to know what were the basic things you do for such a porting.

Quote
You may want to spend some time with Google performing general searches.  For example, this looks helpful...

http://blog.omegacs.net/2010/06/26/getting-started-with-xmega-differences-from-atmega-part-1/

Yes. That was the link that first got me interested in the chip. smiley
Quote
I believe the Arduino IDE ships with a compiler for the XMega processors.

Shouldnt the compilers be the same?
6  Using Arduino / Microcontrollers / Re: Atxmega Series development on: April 26, 2013, 02:39:24 pm
Quote
Are you planning to develop the hardware and software?

hardware to be specific. I was wondering how to do software portion also. I wanted do something like Xaduino.
 
Quote
Do you have a specific application in mind?
Currently no. Thinking in some areas though. It has built in DACs too. Seems better to invest time in these chips for future anyway smiley

Quote
I'm going to go with "no". 
Why is that? Is it because its a new line of chips? How to start off developing these to arduino compatible form?
7  Using Arduino / Microcontrollers / Re: Atxmega Series development on: April 26, 2013, 02:02:20 pm
Can anyone give a start on where to begin in this ?
8  Using Arduino / Microcontrollers / Atxmega Series development on: April 25, 2013, 09:13:44 am
Hi,
I was thinking on the lines on why there wasn't any rush for arduino compatible Atxmega series of boards like Atxmega128a3u?(Is it due to Arduino Due?)
I was wondeing whether I could give it a go on this for the next couple of months.  I started googling and found this item. Seems that someone has already worked on this.

http://www.obdiiworld.com/xaduino/Xaduino-Manual.pdf
http://www.ebay.com/itm/2012-new-Renault-CAN-Clip-newest-version-V120-lowest-price-/180922744611

So my question is how is this developed? I mean how do you go about porting a new series of chips to arduino compatible ones? Can anyone shed any light on this issue? Because I would like to go down to the details on how this is being done. What are the steps involved?

From my understanding, (forgive me if I am totally wrong on this one) I have to write a new bootloader for the Atxmega128a3u and I am done with it? Will all the things work (All libraries) as with say a normal MEGA board? (Or is some porting required? If so how?)
If this is the case how hard (in terms of programming) is it to write a bootloader?

Hoping someone can answer these questions..
Thanking you guys in advance smiley
9  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 19, 2013, 03:56:51 am
Back... smiley

Quote
Yes, good point.  He should avoid  reading the one that has already been latched on-- and only read the other ones.  That is the problem with his current code.

Believe it or not I had tried this with flags but I was getting the same results so I quit trying(it was one late night) rather than thinking it could be a coding error. I think I coded it badly that day because my algorithm was exactly same as @johncc

Anyways I got it working with johncc code. smiley-grin Thank you so very much. smiley
So its actually possible to do it.

So for completion if someone ever faces this same problem. I have attached the code I used for 10 Ledpairs and and the schematic of one.
All thanks to johncc and PeterH smiley

Code:
const int nButtons=10;  // Number of buttons
int ledButtons[]= {
  2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };  // Enter all the LED/Button pair pins on Arduino
int currentOn = -1;

void turnLedOn( int onPin)
{
  // Turn the particular LED pin on,
  digitalWrite(onPin, LOW);
  pinMode(onPin, OUTPUT);

  // if there is an other pin on, turn it off
  if (currentOn > -1)
  {
    pinMode( currentOn, INPUT_PULLUP);  // Enable pullup and turn off other LEDs
  }
}

void setup()
{
  for(int i=0; i<nButtons; i++)
  {
    pinMode(ledButtons[i],INPUT_PULLUP);  // Enabling internal pullups
  }
}

void loop()
{
  for (int i=0; i< nButtons; i++)
  {   
    // read all but the currenly-on button
    if (ledButtons[i] != currentOn && digitalRead( ledButtons[i])== LOW)  // active LOW
    {
      turnLedOn(ledButtons[i]);
      currentOn = ledButtons[i];
      break;
    }
  }
}


10  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 18, 2013, 02:39:39 am
@johncc @peterH
I had tried that earlier by stopping the reading when it was LED was on. but it didnt work...

But your code actually works... Thanks  smiley  So I guess mine was a coding error.

Sorry will write up a detailed reply tomorrow. got to prepare for a test for tomorrow...
Thank you again will get back to you guys tomorrow
11  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 17, 2013, 01:42:34 pm
@johncc
Wiring and pin assignments are correct...
Please Check http://arduino.cc/forum/index.php/topic,148314.msg1116872.html#msg1116872 for the issues I face
12  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 17, 2013, 10:08:49 am
Quote
Don't forget Charlieplexing.
will make the circuit more complex and wiring even more difficult.. and if 1 led or so might fail it could be very hard debug... Anyways nice thought though... never thought about it myself smiley

Quote
I've thought from the beginning that using one pin for input and output would not work.

So I guess this a dead end then... smiley-sad Really hoped to get it working this way... Back to the usual method now... Thank you everyone for your valuable inputs smiley
13  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 16, 2013, 04:04:23 pm
Sorry for the late reply. been really busy in last 2 days..
@PeterH
Quote
his order is very dangerous because it switches the pin to an output (which was previously set HIGH to enable the pull-up resistor) and we already know the button is currently pressed. This combination will overload the pin driver, very likely damaging it. You want to make absolutely sure that any of these pins being used as an OUTPUT are set LOW first.

Do you mean to say put digitalWrite(LOW,button_1) before the following?
Code:
pinMode(button_1, OUTPUT); // Change from Input to Output Mode
    digitalWrite(button_1,LOW);  // Write Low in the pin so that pin continues to glow even after button press is released

Anyways tried it still the same output.. I am starting to think this single input output think may not be possible... smiley-sad
Any last ditch suggestion from anyone??
14  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 14, 2013, 01:39:33 pm
Quote
I haven't checked your code to see whether it does that.

I have to do that with the code given in  reply#15
Code:
int button_1 = 7 , button_2 = 12;
int buttonState_1, buttonState_2;
void setup()
{
  Serial.begin(9600);
  pinMode(button_1,INPUT_PULLUP);  // Enabling internal pullups
  pinMode(button_2,INPUT_PULLUP); 
}
void loop()
{
  // Reading button states
  buttonState_1 = digitalRead(button_1);
  buttonState_2 = digitalRead(button_2);

  // Printing for Debugging
  Serial.print("buttonState_1 = ");
  Serial.println(buttonState_1); 
  Serial.print("buttonState_2 = ");
  Serial.println(buttonState_2);

  if(buttonState_1 == 0)   // Button 1 is pressed. Switch shorted with ground
  {
    // If this button is pressed, the rest of the buttons (button 2 in trial case) should go off
    pinMode(button_2,INPUT);
    digitalWrite(button_2,HIGH); // these two statements must ideally turn off the LED in other pins or does it?
   
    pinMode(button_1, OUTPUT); // Change from Input to Output Mode
    digitalWrite(button_1,LOW);  // Write Low in the pin so that pin continues to glow even after button press is released
  }

  if(buttonState_2 == 0)   // Button 2 is pressed. Switch shorted with ground
  {
    // If this button is pressed, the rest of the buttons (button 1 in trial case) should go off
    pinMode(button_1,INPUT);
    digitalWrite(button_1,HIGH); // these two statements must ideally turn off the LED in other pins or does it?
   
    pinMode(button_2, OUTPUT); // Change from Input to Output Mode
    digitalWrite(button_2,LOW);  // Write Low in the pin so that pin continues to glow even after button press is released
  }
  delay(50);
}
15  Using Arduino / Programming Questions / Re: Reading and writing to a single digital pin on: February 14, 2013, 01:20:54 pm
Quote
Well, you can achieve that with the circuit you showed above by configuring the pin as an input to turn the LED off and enable it to be used as a switch input, and configuring is as an output driven LOW to turn the LED on (it would not be possible to read the switch in this state).

I do believe this is what I am doing with the code. Bu still its causing problems while implementing..

Quote
You can use a resistor ladder to enable multiple switches to be read from a single analog input, and again if you only need to be able to detect one at a time then this can be done very simply with one resistor per switch.
I would try to give this a go soon.

So as of now the circuit which is put up cant work??  smiley-sad
Pages: [1] 2 3 ... 16