RS232 converter + TTL-232R-3V3

If you’re into microcontrollers like me, you should have an FTDI breakout board or the more handy FTDI TTL-232R-3V3 cable. This cable integrates an FTDI USB-to-serial chip and terminates into a 6-pin header, with TTL in/outputs, ready to be interfaced to any microcontroller.

Recently I had to talk to an RS232 port. The voltage used by the RS232 port is anywhere from 7 to 15V (typically), and uses both positive and negative voltages, which cannot be directly interfaced with TTL. Most of my university friends who took microcontroller class previously bought an RS232-to-USB converter, since that’s what the trainer board (evaluation board) uses, but not me. So what should I do now?

Using a MAX232 (actually a HIN232) chip and 5 capacitors, I followed the recommended application circuit to build a level shifter. I laid out the circuit on a veroboard with a 6-pin header on one end for the TTL-232R-3v3 cable, and a 2×5 header for the RS232 port.

Since I ripped out many old computers with those serial port headers I decided to use it. The pinout for the RS232 port header is available in many motherboard manuals, including mine. The only pins (usually) of interest are circled. The pins are 2, 3 and 5 for receive, transmit and ground, respectively.

Continue reading

Made in China

I wonder why the China market is full of stuff like these (click the images for links to the full story).

capacitors

10mm LEDs

ATmega328P’s

bluetooth dongles

and this one probably takes the cake:

But of course, that’s not to say that everything that comes from the country is of this quality. I just wonder why there are  a high number of reports of such duds.

Programming the ATtiny10

Recently I wanted to use a really tiny, low pin-count microcontroller for a project, so I decided to buy a few Atmel ATtiny10 to experiment with.

To get it working, I would need a compiler and a programmer. I like working with Atmel chips because they have cross-platform development tools. The Arduino IDE that I’ve been using comes with avr-gcc and avrdude, both of which are really awesome open source tools for compiling and uploading code to the microcontrollers. If you just want the tools without the Arduino IDE, you can get the WinAVR package.

However both of these tools do not work with the ATtiny10 yet. I do not expect a C compiler, but even the GNU assembler that comes with avr-gcc still doesn’t support this chip. avrdude recently added support for uploading to the ATtiny10, but only through the STK or AVRISP programmer, which I didn’t want to fork out money to buy.

Continue reading

Reverse-engineering the Clicker

A few semesters back, our school started trial runs to use these “clickers” as well. At that time I was thinking of cracking it open to see what makes it tick, as well as evil plans like trying to impersonate other clickers or sniffing what other people’s responses were.

I only managed to peel back a bit of the plastic in front, but since the clicker was brand-new and I had to return it in a good condition, I didn’t dare to proceed any further than that.

[Photo stolen from Travis Goodspeed]

Last night I came across this blog entry to reverse-engineer it. Since all the hard work has been done, it looks quite feasible to just buy one of these Nordic RF chips and attempt to listen in on the responses.

At our institution, each of the venues have been allocated a particular channel and the signage is displayed prominently at the front or side of the lecture theatre or classroom. It’s not hard to find a session to sit in and start sniffing.