Link to home
Start Free TrialLog in
Avatar of Stupot
Stupot

asked on

C code to read TTL levels

Without going into too much unnecessary information here is my problem.  I have a circuit on a helicopter that i am trying hack into for an electronics project.  Specifically one PIC that i am interested in deals with the command signals to the motors, and i need to read this data to evaluate and decode.  A good way of doing this, or so i'm told, is to simply connect the PIC to a serial input and read the TTL levels, (which are 0V - 5V).  I need a program that will read these levels and convert them to a useable format (1's and 0's) and have been trying to find something on the web, can anyone help?
Avatar of George Tokas
George Tokas
Flag of Greece image

PIC is a microcontroler.
That means there is a software inside it to perform some actions.
If you take my advice as electronic engineer also, don't try to hack it.
If it is not protected (I mean at programming phase) then you can get the code from inside the PIC and with dissasembly you can see the program and modify it yourself.

Regards,
gtokas.
Avatar of Stupot
Stupot

ASKER

That would be ideal, but unfortunately the helicopter is fairly revolutionary in its design and the manufacturers have gone to some lengths to ensure that it cannot be reverse engineered that easily (Like scratching off part numbers e.t.c).  Also it's quite expensive (and not mine), so i can't really take the PIC off the circuit to access the code inside.  Also it's probably been protected, though i haven't checked, but the company are reluctant to give any information regarding the circuitry.
SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Stupot

ASKER

I will probably use windows, but have the option to use linux if preferrable.
Also, the person who mentioned the idea suggested using the C functions 'inport' and 'outport'.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are willing to use Linux, take a look at this project: http://vodka.tky.hut.fi/~jap/Programming/Slogan/
This is a simple logic analyzer that reads eight input channels (the eight data lines of the parallel port). You don't need any special hardware, just the software and the connector.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial