If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
The numbers seem consistent. Like, if I keep sending it the same value, it keeps giving me the same value, I just don't know what the values mean ... and how they are encoded, really strange!
Registered Member #1361
Joined: Thu Feb 28 2008, 10:57AM
Location: Cairns, Australia
Posts: 305
Thanks Bjorn, seems like it could be my problem :)
Since the ATMega328 already has direct RS232 input (SInce they use a FTDI chip to generate it), is there any way to invert this signal without having to use another IC?
I'm sorry if this seems ignorant, I really do not understand serial well
Heh nevermind, I'll just pick one of these up today:
Registered Member #2099
Joined: Wed Apr 29 2009, 12:22AM
Location: Los Altos, California
Posts: 1716
Hi Dan. Since your data are repeatable, I'm sure you can resolve your problem by studying the reported 1's and 0's with respect to an ASCII character table, and looking for the pattern.
Things to pay attention to: 1) Voltage levels. 1A) RS-232 is a bipolar standard, where "Mark" voltage (data=1 or idle line) is negative, commonly about -10 volts, and "Space" voltage (data=0) is positive, commonly +10V. 1B) "RS-232 compatible" serial Tx and Rx on microcontrollers, or the logic side of level-translator chips, have TTL voltage levels and the opposite polarity. Mark voltage (idle line or data=1) is > 2 V; Space is < 0.8 V.
2) Parity and stop bit options -- there's no standard, but transmitter and receiver must have the same settings.
3) Bit order: LSB is sent first, right after the Start bit which is the first logic 0 (Space) voltage.
As a baby step, try a loopback configuration with Arduino Tx and Rx pins tied together. Then anything you send to the Tx should appear at the Rx. You might also start with a lower baud setting, like 9600.
Registered Member #56
Joined: Thu Feb 09 2006, 05:02AM
Location: Southern Califorina, USA
Posts: 2445
I am confused as to exactly what you are doing. Keep in mind the arduino TX and RX pins are internally connected to the ftdi usb-serial chip, and any data that appears on the terminal inside the arduino software is present on these pins. Generally when connecting external serial peripherals you will want to use the SoftwareSerial library to create a serial port on 2 unused GPIO pins. My understanding is that it is possible to use these pins to connect to other stuff, but you have to 'fight against' the usb-serial converter so it is not recommended and may be what is causing your problem.
I would recommend starting by connecting the webserver's tx/rx pins together, and making sure that the web interface behaves as you expect it to. After that is working, connect the tx/rx pins to the new software serial port on the arduino, and have it echo received characters from the web server out the arduino debug port (the normal serial.println interface you are using now) and watching what comes out in the terminal in the arduino software. After that is working correctly, then try and send characters from the computer to the arduino, etc.
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.