Archive for 2006

FTDI USB to Serial chips

Saturday, December 30th, 2006

I was playing with one of my FTDI FT232R USB to serial converter chips last night. Really nice device. Not only does it have a serial port that will run at up to 3mbps, but it has a full set of handshaking lines; and any of the eight serial port lines can optionally be inverted.

If that was not enough, it has five additional I/O bits, four of them can be used as general purpose I/O, or be assigned one of many alternate functions – including outputting a 6/12/24/48 MHz clock! It also has a “bitbang” mode that I will explore later.

You can also use it to draw power from the USB cable, and power the electronics you attach to the FT232R – mind you, you really should not draw more than about 70mA from the USB cable to leave plenty of power for the chip.

You can read more about the FT232R HERE.

Rokicki’s SD object is GREAT!

Saturday, December 30th, 2006

I wrote a quick and dirty demo program for it that lists the files on an SD card’s root directory, and then shows the first five lines of text in the last file.

WOHOOO!!!!

I have unlimited (for all intents and purposes) storage for my Propellers!!!!!

 


‘ testsd.spin – quick test program of rokicki’s SD routines

‘ I tested with two files on the card, the fsrw.spin file, and the README.TXT file
‘ as you can see, it works :)

‘ Enjoy!

‘ Bill Henning
 

CON

  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000

obj
  tv: “tv_text”
  fs: “fsrw”

var
  byte filename[12]
 
pub start | i, ch, lines

  ‘ mount the SD card
 
  fs.mount(0)

  ‘start tv terminal

  tv.start(12)

  ‘write intro message
  tv.str(string(“*** SDIO Demo program. List files ***”,13,13))

  ‘open the directory
  fs.opendir

  ‘print the name of each file
  repeat
    if fs.nextfile(@filename)
       tv.str(string(13,”*** THEN SHOW 5 LINES OF LAST FILE ***”,13))
       quit
    else
       tv.str(@filename)
       tv.out(13)

  ‘open last file listed
  fs.popen(@filename,”r”)

  ch := 0
  lines := 0
 
  ‘ show text characters in it
  repeat while (ch > -1) & (lines < 6)     ch := fs.pgetc     if ((ch > 31)&(ch<128)) | (ch == 13)
      tv.out(ch)
    if (ch == 13)
      lines++

 


 

Would you believe my blog software won’t let me upload ‘.spin’ files as a potential security risk? I’ll upload it after I zip it. I also uploaded it as an attachment on the Parallax Propeller Forum.

Best,

Bill

 

 

Cheap SD socket!

Thursday, December 28th, 2006

A couple of days ago, I was working on my second hand wired propeller prototype, and while getting some headers out, I had an idea…

You see, I have these 8 pin, .1″ center Molex male right angle single row headers. It seems that an SD card can just be plugged into them as if it was a socket!

Since pin 9 of the SD cards is only used in the four bit parallel mode, I think we can even get away with using the 8 pin connectors. I had a 9 pin one, and that fit perfectly. Since I was using a mini-SD card, with a mini-SD to SD adapter, I just soldered the SD adapter to the molex connector permanently; it is now a mini-SD socket that is easy to prototype with.

It turns out that my timing was great, as today rockicki released code to read/write SD cards on the Parallax forums!

Welcome to Mikronauts.com!

Saturday, December 16th, 2006

This site is dedicated to those individuals who work with, or like tinkering with, microcontrollers. After a long absence from electronics, I decided to dive back in… the capabilities of current microcontrollers significantly outpace the first micro computers!

I am currently fascinated by the Propeller – a VERY unique microcontroller from Parallax, whom many of you know as the originators of the Basic Stamp series of modules. Despite my fascination with the propeller, I am also working with a few other popular microcontroller families, and I intend to write about all the microcontrollers I end up working with.

You can expect articles on the following microcontroller families:

  • Parallax Propeller
  • Atmel ATMega series
  • PIC 16F, 18F and dsPIC series
  • ARM7 derived controllers

Please note that I welcome contributions about ANY microcontroller – not just the ones listed above!

Best Wishes,

Bill