PDA

View Full Version : Real newbie questions



Ouistyty
11-10-2012, 11:00 PM
Hello.

I'm kind of a newbie regarding Teensy2/3 and Coding.
I already have a Teensy2 board that I am using for an GamePad emulator (http://gimx.fr) for Xbox360. I didn't code anything on this project. I kown that the actual code use AVR and LUFA libraries.

I did some compilation of the code and some reflash of the Teensy2 but nothing more.

I think I'm a not so bad system engineer, but coding et development is not on my daily tasks since I went out of school a couples of couples of years ago.
I do well in scripting wih perl, powershell, vbscript and batch and that help me a lot when I need to read code like C, C# and C++.

I'm also pretty new to linux and trying to make my way with this platform for my personal knowledge.

I just get a new Teensy3 board and I was wondering (maybe a bit too late) what will be the complexity to port the actual C code done for Teensy2 for the Teensy3.
Since it's a Intel Freescale processor instead of Atmel AVR there must be something that will change when I will need to recompile, or maybe I will need to completely change the code.
- Do I just need to recompile ?
- Do I need to add/change/remove libraries ?
- Do I have to change a lot of thing ?
:confused:

All help, hints, link an other support will be appreciated.

Kind regards.

/Ouistyty

Ouistyty
11-10-2012, 11:43 PM
Another small question.
What the difference between RX1/TX1 in purple background with black font(pins 0-1) with the one in purple background and the grey font(pins 21-5) ?

I the project is using RXD1/TXD1 (pins D2/D3) on Teensy2 will the equivalent on Teensy3 be RX1/TX1(pins 0-1) ?
Is it the same pins to activate the serial monitor ?

Regards

/Ouistyty

pia32
11-11-2012, 11:47 PM
You would have to change the whole thing.... It would probably be simpler just to start over from scratch.

Just curious, why do you want to port it

Paul
11-12-2012, 05:24 AM
Another small question.
What the difference between RX1/TX1 in purple background with black font(pins 0-1) with the one in purple background and the grey font(pins 21-5) ?


The black pins are the default. Use those.

The grey are alternate locations. Currently there isn't software support to enable the alternates, but it is possible to make the signals appear on those pins with some direct register writes.




I the project is using RXD1/TXD1 (pins D2/D3) on Teensy2 will the equivalent on Teensy3 be RX1/TX1(pins 0-1) ?
Is it the same pins to activate the serial monitor ?
/Ouistyty

On both Teensy 2.0 and 3.0, the "Serial" which prints to the Arduino Serial Monitor is a USB virtual serial.

Teensy 2.0 has 1 real serial port, which is completely separate from the virtual serial. 3.0 has 3 serial ports. This page has more info, specific to 2.0 (like almost everything on the website, it hasn't been updated with 3.0 details yet).

http://www.pjrc.com/teensy/td_uart.html

On Teensy 3.0, the 3 parts are accessed with Serial1, Serial2, and Serial3. All 3 are independent, so you could connect 3 real serial devices (like GPS units, XBee modules, serial interface displays, bar code scanners, etc) and have all 3 able to work simultaneously with the USB virtual serial. Of course, actually managing 4 streams of data can involve some tricky programming.... but each port has buffering and they all can work independently and simultaneously.

Ouistyty
11-12-2012, 09:00 AM
You would have to change the whole thing.... It would probably be simpler just to start over from scratch.
Thank you for the replie. That was wath I was afraid of.


Just curious, why do you want to port it
The specs of Teensy3 was showing audio input/output support.
And one of the things missing for Xbox360 players in the actual gimx project is the audio support for Xbox Live and game chat. (since it's strongly related to Xbox controller)
Since it is not in the priority list of Malto to support this feature, I tought I could get into it and try it by my self.
And it is also good thing to go forward with the hardware.... Or maybe not. :-/

Ouistyty
11-12-2012, 09:13 AM
The black pins are the default.
....

thank you for your detailed answer.