nuxx.net
Making, baking, and (un-)breaking things in Southeast Michigan.

128MB SD Cards

Do any of you have any spare 128MB SD cards? Or maybe 64MB?

See, I’m going to be giving my grandparents an older 2MP digital camera, and I think the importing of photos / printing / taking the images to Costco for printing thing is a bit much for them. So, instead, I want to get them a handful of 128MB (or so) cards which they can think of as digital film. Then they can just drop the cards in the mail once they are full (or after a particular event) and I can just have them printed for them.

But, I need a bunch of 128MB cards for that. eBay is a bit iffy for them, as the only lots found there seem a bit overpriced for some reason.

(I don’t want bigger cards, really, because then it’ll take my grandparents a really long time to fill them up.)

acquired thingsfamilymoved from livejournal

It works.

When this…

sendCommand(mode2, 0)
sendCommand(playButton, 0)
sendCommand(relButton, 0)

Which supposedly sends these commands…

const mode2 as byte[5] = (0x03,0x00,0x01,0x02,0xFA) 'Simple iPod Remote
const playButton as byte[5] = (0x03,0x02,0x00,0x01,0xFA) 'Play Button
const relButton as byte[5] = (0x03,0x02,0x00,0x00,0xFB) 'Release Button

Gives me this in the serial console…

Received: 0xFF 0x55 0x03 0x00 0x01 0x02 0xFA 0xFF 0x55 0x03 0x02 0x00 0x01 0xFA
Received: 0xFF 0x55 0x03 0x02 0x00 0x00 0xFB

…I know it’s time to go home.

And yes, as suggested earlier I just went ahead pre-calculated the checksums. I also just bundled the packet lengths in there too, and I read that first bit to determine how many bits have to be sent so that packets of arbitrary length may be sent simply by defining them as a constant.

It’s sending back to the PC properly, but not to the iPod. I think that’s because of some weirdness with the pins I chose to use. It worked fine on the PIC16F88, but for some reason that thing cooked this morning. (It now reports itself as some 12F part, likely indicating that some of the bits which indicate the part type have failed.)

Now to get the part running from the internal oscillator instead of a crystal and responding to commands from the serial port. (Both of these should be fairly easy.)

After that I can start building the list of responses I want sent to the Honda Music Link (initial by-hand decoding of a sample conversation between my iPod and the HML can be seen here). Then once that’s all set it’s time to plug it into the car and hope things work as designed. If that works it’s time to design the PCB and see about producing a dozen or so.

Thanks very much and for directing me to pointers, structures (even though I didn’t use structures) and the unknown-to-me mikroBasic manual.

electronicsmaking thingsmoved from livejournal

Basic Help, Please.

I’m having some problems with a subroutine in the small program I’ve been working on mikroBasic for the Honda Music Link stuffs I’ve been doing.

Could any of you help me?

To start, here’s a copy of the program in a text file: hml_mikrobasic_help.txt

Here’s the project itself, zipped up: hml_mikrobasic_help.zip

The IDE / compiler itself, mikroBasic, is available here.

(I’m just using the demo version, and the limit is only on code size, so feel free to install it. I don’t come anywhere near the code limit, and when one does it’s rather obvious, as the compiler just refuses to compile it.

The problem I’m having is with sendCommand(), and specifically the variable iPodCommand, which is the first one passed to it. What I expect to happen is that whatever is passed as the first argument to sendCommand() will be set and available within the procedure. Instead, I seem to be getting something else.

As the program is currently listed, I would expect the output sendCommand(powerOn, 0) to be 0xFF 0x55 0x04 0x00 0x00 0x00 0x04 0xF8. However, the output I receive is 0xFF 0x55 0x02 0xFE 0xB9 0x47.

The expected packet is broken down as follows:

0xFF – Header 1
0x55 – Header 2
0x04 – Data Length
0x00 – Data 1
0x00 – Data 2
0x00 – Data 3
0x04 – Data 4
0x08 – Checksum (0x100 – Data Length – All Data Packets)

The received packet breaks down this way:

0xFF – Expected Header 1
0x55 – Expected Header 2
0x02 – Length appropriate if the constant referenced by iPodCommand were two bites in length.
0xFE – Data 1 (Not sure where this comes from.)
0xB9 – Data 2 (This one neither…)
0x47 – Checksum, calculated properly off of unexpected Data bytes.

When I run things through the hardware debugger I’m not seeing the variable iPodCommand as an array, and I’m not sure why or how (it just shows a value of 0xDF). That, though, and it’s not working as expected, is leading me to believe that I’m doing something wrong in setting up sendCommand().

So, could any of you please help me? I just don’t know what I’m doing wrong.

Thanks!

computerselectronicsmoved from livejournal

PICkit Serial Analyzer

It appears that Microchip will be making the PICkit Serial Analyzer available after May 8th, at a list cost of US$49.99 (with demo board). It’ll read and write I2C, SMBus, SPI, and USART.

I may have to acquire one of these instead of a much larger scale logic analyzer.

UPDATE: Gur, I’m dumb. I just read the docs and realized that it’s not a analyzer, more a USB tool which will communicate as I2C, SMBus, SPI, and USART. I can’t use it for sniffing / capture.

acquired thingselectronicsmoved from livejournal

HobNobs

HobNobs!

Plain HobNobs, my favorite biscuits.
(Click for more moblog photos…)

Thanks, Jungle Jim’s. I now have plain HobNobs, my favorite biscuit. I wish the normal importers brought them in, not just the chocolate-coated varieties.

Now, to mentally prep for a phone conversation with a recruiter. And do some electronics work.

foodmoved from livejournal

8 Conductor Stranded Cable

Would any of you happen to have any eight-conductor stranded cable, preferably shielded?

I need to make some cables for part of the Honda Music Link stuff I’m working on, and I’m having difficulty finding this sort of cable in quantities less than 500′ or 1000′ rolls. I only need maybe… 20′ or so, at most. Even 10′ would be usable for my prototype stuffs.

Thanks!

electronicsmaking thingsmoved from livejournal

Groundhog in Elizabeth Park

Groundhog!Groundhog in Elizabeth Park (Trenton, MI)
(Click for more…)

On the way home from Ohio yesterday I stopped off at Elizabeth Park in Trenton, MI to meet up with Danielle. She had procured a My Little Pony kite and was wanting to get out of the house and fly it. Well, after some kite flying we were getting cold, so we started to walk over towards the water.

As we got closer to the river we noticed a groundhog near the sidewalk. As I walked closer to the groundhog I knelt / sat on the ground, and the groundhog kept getting closer, and closer, and closer, seemingly wanting some food. Well, Danielle ran back to her car and grabbed a small packet of Cheetos Flamin’ Hot Crunchy snacks that she had in the car.

Sure, these aren’t the best thing to be feeding a groundhog, but it can’t be anything worse than what the groundhog would forage out of the garbage cans and from beneath picnic tables in the park. The groundhog happily ate the Cheetos, taking them from our hands and wrapping it’s little paw(s) around them, eating them one at a time, sometimes standing up right next to us.

At one point the groundhog was so close that the only way I could get a photo of it. The photo above was at 24mm, with the camera sitting on my knee and the groundhog about 1.5′ (or maybe less) from the end of the lens hood.

Eventually we were getting a bit cold, so after letting the groundhog nose around in the bag a bit, we decided to give it the rest of the Cheetos. Unfortunately, the seagulls in the park were being a bit of a bother, so the remains of the bag (but not the bag itself) were instead deposited deep into one of the openings to the groundhog’s burrow. Hopefully the seagulls weren’t able to get the bits there.

More information on Marmota monax, (groundhog / woodchuck) is available from this U of M site or this Wikipedia article. All of the uploaded photos from time in Elizabeth Park yesterday can be found here (photo gallery retired).

moved from livejournaloutdoors

Silly iPod Remote

If things go as I hope, the following will take an iPod with it’s serial RX line connected to RB0 and skip it forward one track when the tactile switch RA0 on my dev board is pressed:

program ipod_next_track_test

dim buttonstate as byte

Soft_Uart_Init(PORTB, 1, 0, 9600, 0)

main:
while true
  if Button(PORTA, 0, 1, 1) then
    buttonstate = 255
  end if
  if buttonstate and Button(PORTA, 0, 1, 0) then
    Soft_Uart_Write(0xFF 0x55 0x03 0x02 0x00 0x08 0xF3)
    buttonstate = 0
  end if
wend

I just have to make an appropriate cable and I can test it. (The one I had made broke.)

Now, if that works I can get to work on making the EUSART on the chip respond to the Honda Music Link with enough intelligence to make it think that an iPod is present.

Then, if that works I can get to work on making some of the commands received from the HML act as the aforementioned button press, and I’ll have negated the function crappyness of the HML.

After that point I can make up a cheesy little PCB for the circuit and a PIC16F688 (the smallest PIC I could find with an EUSART) to sit permanently in the car. It shouldn’t need much more than the PIC, a crystal (because I’m not sure the mikroElektonika stuff can set the frequency on the internal oscillator), either a LM78L05 or small switching regulator, headers for the DIN connector cables, and a couple of caps. If I’m bored enough I might even make it my first SMT board.

automotiveelectronicsmaking thingsmoved from livejournal