![]() ![]()
![]() U1MODEbits.ABAUD = 0 // Bit5 No Autobaud (would require sending '55') U1MODEbits.LPBACK = 0 // Bit6 No Loop Back U1MODEbits.WAKE = 0 // Bit7 No Wake up (since we don't sleep here) U1MODEbits.UEN = 0 // Bits8,9 TX,RX enabled, CTS,RTS not U1MODEbits.RTSMD = 0 // Bit11 Simplex Mode U1MODEbits.IREN = 0 // Bit12 No IR translation U1MODEbits.USIDL = 0 // Bit13 Continue in Idle U1MODEbits.UARTEN = 0 // Bit15 TX, RX DISABLED, ENABLE at end of func The HPC16 board has a DB9 connector wired to UART2, so we will ![]() This is an EXAMPLE, so brutal typing goes into explaining all bit sets _FPOR(FPWRT_PWR1) //Turn off power up timer _FWDT(FWDTEN_OFF) //Turn off WatchDog Timer _FOSCSEL(FNOSC_FRC) //Oscillator Selection no PLL _FOSCSEL(FNOSC_FRCPLL) //Oscillator Selection PLL failsafe clock monitor: disabled OSC2 pin function: digital IO _FOSC(OSCIOFNC_ON & FCKSM_CSDCMD & POSCMD_NONE) //Oscillator Configuration (clock switching: disabled However, I was thinking of using the dsPIC33FJ128GP802 :) Or it would also be possible to use the energy generated by the bicycle and store it in capacitors.Īs for the core of the computer, any PIC would do for such a relatively computationally non-intensive job. But since the computer consumes less than a few mA at most, a solar panel is also possible. The entire computer could be powered by batteries. The RTC will maintain time via a "backup battery" and the SD card would be written to every now and then. The microcontroller itself will be in sleep mode most of the time to conserve power.Ī real time clock and SD card (via SPI interface) can also be added to the project to allow for data logging and to add a simple real time clock. The LCD should be small and readable yet consume as little power as possible. The LCD can be of HD44780 type or this or this or one of the graphic LCDs at Futurlec. Readings can be presented to the user every 1 second, for example. With the appropriate crystal, the CCP can then measure the period (in milliseconds) of the wheel to produce very accurate speed readings. On the PIC's side, an appropriate external crystal shall be used with the CCP's timer to allow for millisecond timing. Although only one magnet is required, more can be placed to allow for greater accuracy. To compute the speed of the bicycle, only the circumference/diameter of the wheel and the period must be known. The microcontroller is then interrupted by the event and the CCP module then measures the period. Every time the wheel turns, the magnet will pass the reed switch and close the circuit, sending a signal to the microcontroller. A strong magnet shall be placed on one (or more) of the spokes. The main speed measuring module consists of a reed switch mounted on one of the front forks. ![]() MPLAB C30 3.31 SERIAL FULLThis project can, of course, remain as simple as a mere speed measuring device or can be expanded into a full bicycle computer which maintains trip logs (time, distance, speed, keeping track of rest breaks), control headlights based on ambient light and so on. Based on the period data, the microcontroller then calculates the speed and displays the information to the user on an LCD screen. Here's a new project I've been thinking about building: a bicycle speedometer.Īt it's core, it's just a simple reed switch hooked up to a PIC microcontroller's CCP module (in capture mode) which measures the period of the turning of the wheel. I posted a comment on that site, so just search the page for the user "solarwind" to see my comment about that. Make sure to add the "tm" option to the configuration files. MPLAB C30 3.31 SERIAL INSTALLconfigure, make, sudo make install and reconfigure the netatalk configuration files. Simply download the latest netatalk sources, do a. MPLAB C30 3.31 SERIAL UPDATEYou can follow the tutorial through, like I did, and just update to the latest netatalk when you've completed the tutorial. The tutorial is a year old and the latest version of netatalk has not been uploaded to the ubuntu repositories, so you need to get the latest sources from the netatalk website and compile them yourself (the latest version has Time Machine support). I then followed the tutorial here, to set it up. I stumbled across netatalk which includes an AFP (apple file sharing protocol) server. I originally tried using NFS and Samba, but the setup procedure turned out to be too complicated and neither of them worked out in the end, for some reason (but I'm sure it could be done). MPLAB C30 3.31 SERIAL WINDOWS 7The only large hard drive I had was in my desktop computer dual booting Windows 7 and Ubuntu - so I decided to add an AFP server to Ubuntu to make it act like a Time Machine server. MPLAB C30 3.31 SERIAL PROI recently got a MacBook Pro and wanted to use it's Time Machine functionality. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |