Discuss Serial Port Input Assistance at the iPhone Developer Exchange - Hackint0sh.org; Hi All,
I'm trying to get serial input into my iPhone (3.0) using Colin(TheRain)'s source ...
Serial Port Input Assistance
I'm trying to get serial input into my iPhone (3.0) using Colin(TheRain)'s source code found here: DevDot - Iphone Serial Port Tutorial, which i've slightly modified - to baud 9600 for my micro-controller and to read in 8 bytes instead of just 1.
The problem i'm experiencing is this:
- The serial data my micro-controller is outputting is 8 characters, either '48' or '49', for 0 and 1 in ASCII respectively.
- When i connect a serial cable from my computer to my micro-controllers serial output port, and run putty with the settings 9600, 8, N, 1 - i get this data exactly - "000000000"
- When i connect my iPhone's serial RX port to the micro-controller's serial output port and the iPhone ground pin to the ground of my micro-controllers power supply ground and run the serial program (set to 9600, 8, N, 1) in Terminal, i get the following output "EEEEEEE" - 7 E's, though i'm reading in 8 characters.
- If i cast this data to integers, i get the following:
-58, -58, -58, -58, -58, -58, -58, 6
- When one of the bits is set to 1 instead of 0, an "E" is changed to an "F" - eg 1. 00000010 is displayed as EEEEEFE
eg 2. 01000000 is displayed as FEEEEEE
This makes sense as it is the next ASCII value.
However, if the MSB is set to 1 - 10000000 - i get the output gEEEEEE
This bits are being read in from the MSB to the LSB.
It appears as if the MSB and MSB-1 are being over-written.
Has anyone seen this before? Does anyone have any suggestions?
All help is appreciated.
Placing a 10K resistor between the serial output pin of the micro-controller and the iPhone serial input pin doesn't help
If someone has gotten serial input working can they give some tips?
By cioto in forum iPhone Developer Exchange
Last Post: 12-27-2010, 05:03 PM
By Sheerz in forum Kernel / Kext (Driver) Support
Last Post: 03-25-2010, 01:28 AM
By netboy in forum Installation
Last Post: 03-02-2010, 07:10 PM
By iphonejoe in forum Free Toolchain Software
Last Post: 02-04-2010, 09:22 AM
By hackint0sh in forum Latest Headlines
Last Post: 01-21-2010, 03:40 PM
Tags for this Thread