Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
MO-RX3400-A is an ASK receiver module. The MO-RX3400-Ais based on a single-conversion ,super-heterodyne receiver architecture and incorporates an entire Phase-Locked Loop (PLL) for precise local oscillator generation. It can use in OOK / HCS / PWM modulation signal and demodulate to digital signal. MO-RX3400-A had a high performance and easily to design your product.
what do you mean by clean power?
55 56 56 56 59 59 59 59 59 55 55 55 55 55 55 56 56 56 56 56 59 59 59 59 59 55 55 55 55 55 55 56 56 56 56 56 59 59 59 59 59 55 55 55 55 55 55 56 56 56 56 56 59 59 59 59 59 55 55 55 55 56 59 59 59 59 55 55 55 55 55 56 56 56 56 56 59 59 59 59 59 59 55 55 55 55 55 56 56 56 56 56 59 59 59 59 59 59 55 55 55 55 55 56 56 56 56 56 59 59 ....
SendByte(data1); //55SendByte(data2); //56SendByte(data3); //55
Here is my SendByte routine Code: [Select]void SendByte(char c) { while (!(UCSR0A & (1<<UDRE0))); // wait until you are able to send a byte UDR0 = c;}Here is my getbyte routineCode: [Select]int GetByte0(void){ while((UCSR0A&(1<<RXC0)) == 0); // wait until a byte is received return UDR0;}
void SendByte(char c) { while (!(UCSR0A & (1<<UDRE0))); // wait until you are able to send a byte UDR0 = c;}
int GetByte0(void){ while((UCSR0A&(1<<RXC0)) == 0); // wait until a byte is received return UDR0;}
void report(void){int data; while(1) { data = GetByte0(); SendByte1(data); }
void send(void){while(1){//#define data1 0b01010101//#define data2 0b01010110//#define data3 0b01011001SendByte(data1); //55SendByte(data2); //56SendByte(data3); //59 }}
Also, can I just use PWM on the transmitter and take an ADC on the receiver?
Also you mentioned a couple of posts ago that you jumpered the tx pin to the rx pin, this in itself explains the repetition of bytes it similar to the sqeaky noise you get when you put a microphone next to a speaker.
while(1){ for(i = 0; i < 255; i++){ for(j = 0; j < 255; j++){ SendByte(i); SendByte(j); SendNewLine(); } }}
I guess I can't really verify the transmission directly. I could do it indirectly and have uart1 ( the USB) send the same thing as uart0 .
hey Paul, nope. he means the TX on one AVR to the RX on another.basically testing the code without the RF modules. just a wire between the UARTs (and a common GND ).
What voltage was the transmitter at ? Did you use a capacitor between antenna and GND ?
Did you use AVRlib or did you do all coding from scratch?
Also my code does use the interrupt on uart, but throws any bytes away that dont conform to the packet start sequence.
// enable interrupts //sei(); <---- this was usually uncommented , I commented it
56 55 56 55 56 56 55 59 56 59 55 59 56 56 55 59 56 59 56 55 59 56 55 59 55 56 55 59 56 55 59 55 59 56 55 56 55 59 56 59 59 56 55 59 56 55 56 55 55 56 55 56 55 59 56 59 55 56 59 56 56 56 55 55 56 59 56 55 59 56 55 56 55 55 55 56 59 55 59 55 59 59 59 56 59 55 56 56 56 55 59 56 55 55 59 59 59 56 55 55 59 55 59 56 55 56 59 56 59 56 55 56 55 59 56 55 59 56 55 56 55 56 59 56 59 56 55 55 59 56 56 55 59 56 56 55 59 56 55 59 56 59 56 55 59 55 59 56 56 56 55 55 56 55 59 56 55 56 59 56 55 59 56 56 55 56 55 59 56 55 59 55 59 59 55 56 55 55 56 56 59 59 55 59 56 56 56 55 59 55 56 56 55 59 55 59 55 59 56 56 56 56 56 59 55 55 59 59 59 56 55 56 55 55 59 56 56 55 56 55 59 55 59 56 55 55 55 56 59 56 55 59 56 59 56 55 56 55 59 55 56 55 56 55 59 56 55 56 55 59 55 56 55 56 55 59 56 56 59 55 59 59 55 59 56 59 56 56 59 56 55 59 56 55 56 56 56 59 59 56 56 59 55 59 56 55 59 55 59 56 56 59 56 55 56 59 59 56 55 59 56 55 56 55 59 56 59 56 55 59 59 55 56 59 56 55 55 56 59 56 55 55 59 56 59 56 59 55 59 59 56 55 59 59 56 55 56 55 59 56 56 55 59 56 56 55 56 55 56 56 56 59 59 56 56 59 55 59 56 59 55 56 59 56 56 59 56 55 59 56 55 55 55 59 56 59 56 59 55 55 55 59 56 55 59 55 59 56 59 56 55 59 56 59 56 55 56 55 55 55 56 55 56 59 55 56 55 59 55 59 56 55 59 56 59 56 55 56 59 59 56 55 59 55 55 55 59 55 59 59 59 55 56 55 56 55 59 56 55 56 55 55 59 56 59 55 59 56 56 59 56 55 56 55 59 56 59 59 55 59 56 55 59 59 59 56 59 55 55 59 56 59 55 59 56 59 56 55 59 56 55 56 56 55 56 55 55 56 56 59 56 59 56 55 56 55 56 55 56 55 59 55 59 56 55 56 56 59 56 56 55 59 55 59 55 55 59 55 59 55 56 56 55 55 55 56
void uart1Init(void){ // initialize the buffers uart1InitBuffers(); // initialize user receive handlers UartRxFunc[1] = 0; // enable RxD/TxD and interrupts outb(UCSR1B, BV(RXEN)|BV(TXEN)); // <------- took out RXIE and TXIE // set default baud rate uartSetBaudRate(1, UART1_DEFAULT_BAUD_RATE); // initialize states uartReadyTx[1] = TRUE; uartBufferedTx[1] = FALSE; // clear overflow count uartRxOverflow[1] = 0; // enable interrupts //sei();}
while(1){SendByte(data1); //55delay_ms(5);SendByte(data2); //56delay_ms(5);SendByte(data3); //59delay_ms(5); }