Results 1 to 2 of 2
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 ...
  1. #1
    Newbie Array

    Join Date
    Dec 2009
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Serial Port Input Assistance

    Hi All,

    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.

    Thanks.



  2. #2
    Newbie Array

    Join Date
    Dec 2009
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Placing a 10K resistor between the serial output pin of the micro-controller and the iPhone serial input pin doesn't help

    Any suggestions?

    If someone has gotten serial input working can they give some tips?

 

 

Similar Threads

  1. serial input in XCode
    By cioto in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 12-27-2010, 04:03 PM
  2. Serial Port
    By Sheerz in forum Kernel / Kext (Driver) Support
    Replies: 1
    Last Post: 03-25-2010, 12:28 AM
  3. serial port problems
    By netboy in forum Installation
    Replies: 0
    Last Post: 03-02-2010, 06:10 PM
  4. trying to use the serial port
    By iphonejoe in forum Free Toolchain Software (Cydia App's)
    Replies: 39
    Last Post: 02-04-2010, 08:22 AM
  5. Replies: 0
    Last Post: 01-21-2010, 02:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 10:07 PM.
twitter, follow us!