<commit_before>/** ATtiny841 test
 * 
 * Author: <NAME> (www.bot-thoughts.com)
 * Description: Sequentially turns on a single pin on PA0-7 and PB0-2. PB3 is reset, PB0, PB1 are XTAL
 *   but still usable if fuses are set to use internal oscillator. Assumes Tiny is sourcing current
 *   to LED (active high)
 *
 */
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>

#define DELAY 80

int main()
{
	int i;

	// All PORTA as output
	DDRA=0xff;   
	// PB0-2, PB3 is reset, PB0, PB1 are XTAL
	DDRB=0x07;
	
	PORTA=0;
	PORTB=0;

	while (1) {
		for (i = 0; i < 8; i++) {
			PORTA = (1 << i);
			_delay_ms(DELAY);
		}
		PORTA = 0;
		for (i = 0; i < 3; i++) {
			PORTB = (1 << i);
			_delay_ms(DELAY);
		}
		for (i = 2; i >= 0; i--) {
			PORTB = (1 << i);
			_delay_ms(DELAY);
		}
		PORTB = 0;
		for (i = 7; i >= 0; i--) {
			PORTA = (1 << i);
			_delay_ms(DELAY);
		}
	}

}<commit_msg>minor reformat. fixed loop variables. changed delay<commit_after>/** ATtiny841 test
 * 
 * Author: <NAME> (www.bot-thoughts.com)
 * Description: Sequentially turns on a single pin on PA0-7 and PB0-2. PB3 is reset, PB0, PB1 are XTAL
 *   but still usable if fuses are set to use internal oscillator. Assumes Tiny is sourcing current
 *   to LED (active high)
 *
 */
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>

#define DELAY 100

int main()
{
	int i;

	DDRA=0xff; // All PORTA as output
	DDRB=0x07; // PB0-2, PB3 is reset, PB0, PB1 are XTAL
	
	PORTA=0;
	PORTB=0;

	while (1) {
		for (i = 0; i < 8; i++) {
			PORTA = (1 << i);
			_delay_ms(DELAY);
		}
		PORTA = 0;
		for (i = 2; i >= 0; i--) {
			PORTB = (1 << i);
			_delay_ms(DELAY);
		}
		for (i = 0; i < 3; i++) {
			PORTB = (1 << i);
			_delay_ms(DELAY);
		}
		PORTB = 0;
		for (i = 7; i >= 0; i--) {
			PORTA = (1 << i);
			_delay_ms(DELAY);
		}
	}

}
{'fraction_non_alphanumeric': 0.16939890710382513, 'fraction_numerical': 0.04207650273224044, 'mean_word_length': 2.548449612403101, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2632782', 'n_tokens_mistral': 921, 'n_tokens_neox': 803, 'n_words': 244}