Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Newb question, RS232 or TTL


  • Please log in to reply
12 replies to this topic

#1 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 26 October 2011 - 08:27 PM

Hi, it's me, supernewbie ! ;) I'm playing with my mini atm, and I decided to use TTL to debug and deploy. This works great, but I was hoping I could use pins 1 to 3 in my code as GPIO while deploying over TTL. Appairently this is not the case. Am I wrong, am I doing something wrong, please explain :)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 27 October 2011 - 03:56 AM

Sorry, but...I suppose that "atm" stands for Netduino mini, and "TTL" for UART at TTL-level... If so, I don't mean the point at all...
Biggest fault of Netduino? It runs by electricity.

#3 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 27 October 2011 - 05:39 AM

I'm playing with my mini atm, and I decided to use TTL to debug and deploy. This works great, but I was hoping I could use pins 1 to 3 in my code as GPIO while deploying over TTL. Appairently this is not the case.

I think that pins 1-3 are reserved for RS232 only. You can switch to deploying/debugging over RS232 and this will free up pins 11 & 12.

Sorry, but...I suppose that "atm" stands for Netduino mini, and "TTL" for UART at TTL-level...

ATM = At The Moment

Hope tis helps,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 October 2011 - 05:46 AM

Advanced topic :) Actually, you can use pins 1-3 as GPIO (for pin 3, input only) if you use TTL for deploy/debug. However, they will be -5V/5V+ outputs (from the TTL-RS232 chip), not 0/3V3 outputs. And you'll need to reference them using (Cpu.Pin) casting, pulling their pin #s from the Netduino Mini schematic. Chris

#5 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 27 October 2011 - 05:55 AM

Actually, you can use pins 1-3 as GPIO (for pin 3, input only) if you use TTL for deploy/debug. However, they will be -5V/5V+ outputs (from the TTL-RS232 chip), not 0/3V3 outputs. And you'll need to reference them using (Cpu.Pin) casting, pulling their pin #s from the Netduino Mini schematic.

Ooooooo - now I can see that being really handy to have access to.

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#6 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 27 October 2011 - 06:27 AM

Advanced topic :)

Ahhh, so it's actually not such a newb-question :D

I was thinking, when using TTL for deployment, I only use 2 pins instead of 3, so it saves 1 pin. Also, my laptop has no serial port and I have a TTL-to-USB-breakout.

The -5V to +5V could be interesting to play with, just as the input port. But not for my current project.

From http://www.netduino....i/schematic.pdf:

DRXD -> PA27
DTXD -> PA28
DTR -> PA29

Am I correct that they're (cpu.pin)27 to (cpu.pin)29 ?
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 27 October 2011 - 06:50 AM

Am I correct that they're (cpu.pin)27 to (cpu.pin)29 ?

Precisely!

Also, be careful when using pin 29. The "DTR" pin -- (Cpu.Pin)29 -- is checked during boot. If it's active, then your Netduino Mini will go into bootloader mode :) It's available for your use in code...but only as an advanced hack ;)

BTW, you might notice that you can't create an OutputPort with that pin. .NET MF automatically protects you :)

Chris

#8 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 27 October 2011 - 07:44 AM

Also, be careful when using pin 29. The "DTR" pin -- (Cpu.Pin)29 -- is checked during boot. If it's active, then your Netduino Mini will go into bootloader mode :) It's available for your use in code...but only as an advanced hack ;)

BTW, you might notice that you can't create an OutputPort with that pin. .NET MF automatically protects you :)

Cool! Going to play with it some day, for my current project, I stay at RS232-deployment then. I want to keep as many pins available as possible.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#9 cys

cys

    Advanced Member

  • Members
  • PipPipPip
  • 113 posts
  • LocationSoCal

Posted 23 July 2012 - 04:04 AM

I know this is an old thread, but has anyone played with pins 1-3 [(cpu.pin)27 to (cpu.pin)29] for anything other than RS232 deployment?

#10 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 23 July 2012 - 08:24 AM

I've considered it, but because it outputs -5V to +5V (if I'm correct) I didn't found a good use for it. It is possible though, to drive them that way!
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#11 cys

cys

    Advanced Member

  • Members
  • PipPipPip
  • 113 posts
  • LocationSoCal

Posted 23 July 2012 - 07:48 PM

I was hoping someone might have come up with an application for the +/-5V. I guess I'm going to try incorporating a sub-circuit on my pcb that converts rs232 to ttl.


I've considered it, but because it outputs -5V to +5V (if I'm correct) I didn't found a good use for it. It is possible though, to drive them that way!



#12 cys

cys

    Advanced Member

  • Members
  • PipPipPip
  • 113 posts
  • LocationSoCal

Posted 20 September 2012 - 03:07 AM

I'm working on using pins 1 and 2. I need one more pin for my project.

If I create an output port as: OutputPort _output = new OutputPort((Cpu.Pin)27, false); or OutputPort _output = new OutputPort((Cpu.Pin)27, true);, a DVM shows that nothing changes on pin 1 or pin 2. DRXD is shown on the schematic as "G3 PA27/PGMD15."

If PA27/DRXD is (Cpu.Pin)27, then what would then be the (Cpu.Pin) identity of PB27/ADO D9?

[Note added: Per a recent thread, PA references PIO controller A multiplexing and PB controller B multiplexing -- pages 31-33 of the ARM document.]

#13 cys

cys

    Advanced Member

  • Members
  • PipPipPip
  • 113 posts
  • LocationSoCal

Posted 20 September 2012 - 03:20 AM

In case anyone is interested, my mini project is a scuba diving computer that tracks decompression obligation, and controls a rebreather solenoid based on voting logic input from three oxygen sensors. I need one more pin to control the spi bus to use a flash memory chip (I understand that the new firmware will give access to flash, but I don't want to change firmware yet). Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.