Skip to content

This is a library used in an ATmega16 micro-controller for communicating to mobile through a headphone jack

Notifications You must be signed in to change notification settings

micro-modem/atmega16-modem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Atmega16 Modem

You can connect to smart devices such as iPhones, Android, or laptops via the headphone jack with this library. You can find more information here.

Resource Usage

This library requires the following microcontroller resources to work:

  • Timer 1: Frequency timing
    • Timer 1A: for timing the received frequencies
    • Timer 1B: for timing the transmitted frequencies
  • PB2 (AIN0): The frequency input port of the speaker bus
  • PA2 (ADC2): Constant voltage input port for comparison with input frequency voltage
  • PD4 (OC1B): Output frequency port to the microphone bus
  • Timer 1 Input Capture Interrupt
  • Timer 1 Compare Match Interrupt A
  • Timer 1 Compare Match Interrupt B

Usage

In this code example, we echo the incoming messages back to the smart device.

#include <avr/io.h>
#include <avr/interrupt.h>
#include <modem.h>

void on_receive_msg(const char *msg, uint8_t size) {
	modem_snd_async(msg, size);
}

int main(void) {
	sei();
	modem_lsn(on_receive_msg);
	while(1);
}

Schematic

schematic

License

The project is licensed under the GPLv3.

About

This is a library used in an ATmega16 micro-controller for communicating to mobile through a headphone jack

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages