<commit_before>/*
 * display.c
 *
 * Created: 06-Nov-14 23:01:30
 *  Author: 4a4ik
 */ 

#include "functions.h"

#define PROGRAM_PORT PORTC
//PORT B
#define PIN_RS 0
#define PIN_RW 6
#define PIN_E  1

#define HIGH_PORT PORTC
//PORT D
#define PIN_DB4  5
#define PIN_DB5  4
#define PIN_DB6  3
#define PIN_DB7  2

void send()
{
	PROGRAM_PORT |= ( 1 << PIN_E );
	//wait
	_delay_us(1);
	//don't send
	PROGRAM_PORT &= ~( 1 << PIN_E );
	
	//clear command
	PROGRAM_PORT &= ~(( 1 << PIN_E )|( 1 << PIN_RW )|( 1 << PIN_RS ));
	HIGH_PORT    &= ~(( 1 << PIN_DB7 )|( 1 << PIN_DB6 )|( 1 << PIN_DB5 )|( 1 << PIN_DB4 ));
}

void write_symbol( char a )<commit_msg>Update 3.c<commit_after>/*
 * display.c
 *
 * Created: 06-Nov-14 23:01:30
 *  Author: 4a4ik
 */ 

#define F_CPU 8000000UL

#include <avr/io.h>
#include <util/delay.h>

#define PROGRAM_PORT PORTC
//PORT B
#define PIN_RS 0
#define PIN_RW 6
#define PIN_E  1

#define HIGH_PORT PORTC
//PORT D
#define PIN_DB4  5
#define PIN_DB5  4
#define PIN_DB6  3
#define PIN_DB7  2

void send();
void write_symbol( char a );
void initialize( int _2_line );
void set_mode( int display_shift, int right );
void enable_display( int display_on, int cursor_on, int blinking_on );
void return_cursor();
void clear_display();
void move_cursor( int x_pos, int line );
void lcd_init();

int main(void)
{
	DDRC = 0b00111111;
	
	lcd_init();
	
	write_symbol('4');
	write_symbol('a');
	write_symbol('4');
	write_symbol('i');
	write_symbol('k');
	
	move_cursor( 10, 2 );
	
    while(1)
    {
		 
    }
}

void send()
{
	PROGRAM_PORT |= ( 1 << PIN_E );
	//wait
	_delay_us(1);
	//don't send
	PROGRAM_PORT &= ~( 1 << PIN_E );
	
	//clear command
	PROGRAM_PORT &= ~(( 1 << PIN_E )|( 1 << PIN_RW )|( 1 << PIN_RS ));
	HIGH_PORT    &= ~(( 1 << PIN_DB7 )|( 1 << PIN_DB6 )|( 1 << PIN_DB5 )|( 1 << PIN_DB4 ));
}

void write_symbol( char a )
{'fraction_non_alphanumeric': 0.16422764227642275, 'fraction_numerical': 0.053116531165311655, 'mean_word_length': 3.469733656174334, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4783840', 'n_tokens_mistral': 896, 'n_tokens_neox': 786, 'n_words': 204}