Sorry about the long delay in my response. Was waiting for radio hardware to come in and the holidays to pass. Anyway here is my situation I have a radio transmitter that is supposedly expecting a 1200bps 7,E,1 UART transmission from my ATMEGA328-P-PU chip. I have the radio connected to pin 3 of the chip for comms, and pins 7 and 8 for power. I have the Xprotolab connected on Logic2 (UART RX) to the ATMEGA Pin3. When I run the UART sniffer all is get is 0's or garbage depending on settings. The chip is running this Arduino Sketch.
void setup() {
///init serial comms
Serial.begin(1200,SERIAL_7E1); }
// Loop for testing, final revision will be run once per power cycle
void loop() {
//turn pin 9 on to full power
analogWrite(9, 255);
//wait 5ms for sensor to settle
delay(5);
// read the input on analog pin A5:
int sensorValue = analogRead(A5);
// Convert the analog reading to a voltage and multiply by 100 to remove decimal point:
float voltage = sensorValue * (5.0 / 10.23);
//turn pin 9 off
analogWrite(9, 0);
//build array
char voltread[10];
sprintf (voltread, "V;RB0%03i;",(int)voltage);
//add checksum to transmission
byte checksum = 0;
for(int i = 0; i < 9; i++) checksum ^= voltread;
char transmission[13];
sprintf (transmission, "%s%x;", voltread, checksum);
Serial.println(transmission);
delay(3000);}
The output should look like V;RB0475;3F (everything after RB0 will vary based on reading and checksum calculation). The program outputs to a variable resistor then reads the return voltage to insert into the message.