I2C terminal for pc

Electronics Computer Programming Q&A
Post Reply
L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:

I2C terminal for pc

Post by L. Daniel Rosa »

Some things I'd like to make with microcontrollers require I2C communication. I considered aking a terminal with a PIC, but the same problem remains- I must 'talk' to it while developing and debugging the code.<p>Is there a minimalist software utility out there (requiring no more than a level shifter/voltage limiter on one of the ports). I have a dedicated computer for my hobby, so all the ports are available.
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: I2C terminal for pc

Post by dyarker »

Is the I2C connection on the microprocessor board TTL level or RS-485? Makes a difference on what the RS-232 levels of the PC's serial port are shifted to.<p>Is the I2C 8 or 9 bit? If 9 bit, but bit 9 is always zero; then HyperTerminal can be set to 8 data bits and parity = space.<p>Set two ports on microprocessor, an 8 bit one for programming/troublshooting from PC, and an I2C one to talk to other I2C devices. Or jumper on microcontroller board to select port type at power on.
Dale Y
robnee
Posts: 6
Joined: Mon Feb 07, 2005 1:01 am
Location: New York
Contact:

Re: I2C terminal for pc

Post by robnee »

I think what your asking is for some simple routines to do RS-232 comm with a PC for debugging purposes. This is easily achieved with minimal hardware. I forego a TTL->RS232 level shifter in favor of a couple of resistors all the time in my designs and, at speeds <= 9600 baud never have any trouble sending chars to a PC terminal. I use TeraTerm for this rather than HyperTerminal as I find the former easier to configure but one's really no better than the other.<p>If you aren't afraid of PIC assembler I have some bit-banging rs232 routines I could send you if you want.<p>Rob
L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:

Re: I2C terminal for pc

Post by L. Daniel Rosa »

Thank you fellow hobbyists. That was a quick response.<p>Dale Y, it is a format that I suspect is incompatible with hyperterminal. The start, restart, and stop conditions are foreign to asynchronous hardware. It may be TTL compatible at 5V, but can go lower.<p>robnee, thanks. I'm writing some too. I just need to test to see if the code is communicating.<p>I seem to have been misleading with my hardware requirements. I mentioned the voltage limiter and level shifter because I don't know whether the computer's port will try to send -15V down the line, and I need to prevent this. I am not looking for RS- anything, only IIC (a diminutive of SPI).
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: I2C terminal for pc

Post by dyarker »

The serial port on a PC is RS-232. A mark is at least -6V, nominally -12V, or more. A space is at least +6V, +12V nominal, or more.<p>On the microprocessor a mark will be nominally Vcc (+5V or +3.3V), and a space around 0V. Note the mark/space inversion.<p>If the board the microprocessor is on doesn't have a level convertor chip, then you will diodes to protect the microprocessor from negative voltages. Many PC ports seem to read 0V to +5V on the input okay; but it is outside the spec and they don't have to. Code on the uP can take care of marks and spaces.
Dale Y
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests