CURRENT ISSUE

Contests

bottom corner

FEATURE ARTICLE



Issue #216 July 2008

Second Place Microchip 2007 Design Contest
’Net-Enabled Alarm Clock

by DJ Delorie

Start | System Overview | Network | Display | MP3 | ADC | Memory | Power | Software | Time | Alarms | GUI | Remote Protocols | Construction & Packaging | Smart Combinations | Sources & PDF

NETWORK

The ENC28J60 Ethernet chip handles networking (again in a 28-pin DIP package). The magnetics are contained in the RJ-45 jack, leaving only a 25-MHz crystal oscillator and some discretes to complete the circuit. Because the two LEDs are inside the cabinet to avoid light pollution, they’re reprogrammed to indicate transmit and receive traffic instead of link and activity.

The PIC24FJ64 talks to the network chip via a SPI bus running at 4 MHz, which is shared with the MP3 chip. While the Microchip TCP/IP stack is used, the default parameters (buffer size and timeouts) weren’t aggressive enough to smoothly stream MP3 data. The receive buffer was made much larger (600 bytes) than the transmit buffer (100 bytes). The retry timeout was decreased well below the “standard” value to 5 ms. If a packet is missed, there may not even be a gap in the music.

In addition to the MP3 stream, there’s also a DHCP module to configure the network stack and an SNTP module to retrieve the current time. SNTP is the “simple” form of NTP; it requires only one request packet and one response packet, and can use broadcast UDP.[1]

Previous | Next                *| Subscription Deals |*

 


bottom corner