-
1Step 1
From the file '_GettingStartedMega328P.txt'
(Developed alongside submission of 'audioThing' to the contest)
IF THIS LINE-WRAPS ODDLY:
Try to Resize your window-width (counter-intuitively: *smaller* may look better, as HaD apparently lays-out the page differently depending on your window's width).
Unless otherwise mentioned: commonThing tests are usually located in _commonCode_localized/<commonThing>/<version>/testMega328p/ If working with another MCU: Look into the makefile, change the line "MCU=" Look at pinouts (choose different pins, as necessary) Most AVRs are set up to run off the internal RC-Oscillator, by default... Though this can be checked by looking into _commonCode_localized/_make/
<MCU>.mk and changed by typing your own FUSEH/FUSEL values into *your* makefile. The default chip-programmer is avrdude with a usb-tiny... check out: _make/avrCommon.mk Run 'make fuse' 'make clean' 'make' 'make run' In order of increasing complexity, ish... This order is a good way to start heartBeat heartBeat fades an LED in then out, ala the good ol' Mac "sleep" indicator. With DMS the fade-cycle takes 8 seconds. If you press the button, the heart will begin blinking the number of times the button was pressed. (Until 4, when it returns to fading) polled_uat/testMega328p polled_uat is a polled/bitbanged UART (serial port) without the receiver. The test program runs at 9600 baud and transmits "Boot:" upon power-up, and counts from 0-9, one step per second. polled_uar polled_uar is a polled/bitbanged UART (serial port) without the transmitter. The test program runs at 9600 baud. Send characters '1'-'9' and the heartBeat indicator will blink the specified number of times ('0' returns it to fading) polled_uat/testTxRxMega328p This is a Tx/Rx program which is nearly identical to polled_uar's with the addition of: it transmits a message on boot, sends '.' periodically, and echos received characters. polled_uat/testTxRxMega328p+syncError Please see the file NOTE.TXT regarding sync-errors related to heartbeat's spending too much time updating, and how it can be easily fixed... AT THIS POINT: You have an LED, and Tx/Rx, so anything new can be tested from here... e.g.: I need to implement SPI via the USART... Haven't done this before... Did SPI before via USI on another device, but that's different. Enter: usart_spi/testMega328p After implementing SPI via the USART in this commonThing's code, the actual Test-Code is nearly identical to that of polled_uat/testTxRxMega328p+syncError (a/o 0.10ncf) nlcd/testMega328p This tests the Nokia LCD, it expands on usart_spi's test. anaButtons/testMega328p This tests "anaButtons" -- a method for interfacing an array of buttons via resistors and a capacitor to a single (typically *digital*) input. adcFreeRunning/testMega328p This samples the ADC in "free-running" mode, in which the ADC samples immediately after the previous conversion, continuously. The test-program reports the minimum and maximum values measured, as well as the number of measurements, once per second. This is based off of polled_uat/testMega328p.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.