Changeset - f6804d996c04
[Not reviewed]
default
0 1 0
ethanzonca@CL-SEC241-08.cedarville.edu - 12 years ago 2012-10-30 11:58:17
ethanzonca@CL-SEC241-08.cedarville.edu
AFSK is now (pretty much completely) up and running
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
master/master/lib/afsk.c
Show inline comments
 
@@ -98,10 +98,9 @@ void afsk_setup() {
 
}
 

	
 
	
 

	
 
void afsk_test() {	
 
	uint8_t flap[32] = "somethingawesomesomethingawesome";
 
	afsk_send(flap, 32);
 
	uint8_t flap[26] = {"abcdefghijklmnopqrstuvwxyz"};
 
	afsk_send(flap, sizeof(flap)*8);
 
	afsk_start();
 
	while(afsk_busy());
 
	_delay_ms(500);
 
@@ -116,6 +115,7 @@ void afsk_test() {
 

	
 
#define BAUD_RATE 1200
 
//#define SAMPLES_PER_BAUD PLAYBACK_RATE / BAUD_RATE // = 36
 
//#define SAMPLES_PER_BAUD 36
 
#define SAMPLES_PER_BAUD 36
 

	
 

	
 
@@ -205,7 +205,7 @@ ISR(TIMER2_OVF_vect)
 

	
 
		if(++current_sample_in_baud == SAMPLES_PER_BAUD) {
 
			// sounds fun when this is commented out... but why??!?!
 
			//current_sample_in_baud = 0;
 
			current_sample_in_baud = 0;
 
			packet_pos++;
 
		}
 
		
 
@@ -230,7 +230,7 @@ void afsk_timer_stop()
 
{
 
	// Resting duty cycle
 
	// Output 0v (could be 255/2, which is 0v after coupling... doesn't really matter)
 
	OCR2B = 0x00;
 
	OCR2B = 0x80;
 

	
 
	// Disable playback interrupt
 
	TIMSK2 &= ~_BV(TOIE2);
0 comments (0 inline, 0 general)