Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

receiving tons of dummy data from computer port

Status
Not open for further replies.

einton

New Member
Hi guys , i m involved in quite a annoying problem , the problem is when i tried to interface pic18f2580 to computer com port using program in mikroc pro i eventually received tons of dummy data without any break i dont know the problem but the data look like this
000013b0: 6B 7B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B k{kkkkkkkkkkkkkk
000013c0: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkkkkkkkkkkkkkk
000013d0: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkkkkkkkkkkkkkk
000013e0: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 7B 6B kkkkkkkkkkkkkk{k
000013f0: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkkkkkkkkkkkkkk
00001400: 6B 6B 7B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kk{kkkkkkkkkkkkk
00001410: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkkkkkkkkkkkkkk
00001420: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 7B 6B 6B 6B 6B kkkkkkkkkkk{kkkk
00001430: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkkkkkkkkkkkkkk
00001440: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkkkkkkkkkkkkkk
00001450: 6B 6B 6B 6B 7B 6B 6B 6B | 6B 6B 6B 6B 6B 6B 6B 6B kkkk{kkkkkkkkkkk
00001460: 6B 6B 6B 6B 6B 6B 6B 6B | 7B 6B 6B 6B 6B 6B 6B 6B kkkkkkkk{kkkkkkk
00001470: 6B 6B 6B 6B 6B 6B 6B 6B | 6B 6B 7B 6B 6B 6B 6B 6B kkkkkkkkkk{kkkkk
00001480: 6B 6B 6B 4B 5B 5B DB DB | DB DB DB DB DB DB DB DB kkkK[[ÛÛÛÛÛÛÛÛÛÛ
00001490: DB DB DB 6D DB DB D9 DB | DB 9B 9B BB B3 B3 B3 B3 ÛÛÛmÛÛÙÛÛ››»³³³³
000014a0: B3 B3 B7 F7 ³³·÷


i m using the advanced port terminal i have also used mikroc pro usart tool but the same tons of data i eventually receive when i plug on , my program follows as

Code:
char uart_rd;

void main() {

  ADCON1 |= 0x0F;                 // Configure AN pins as digital

  UART1_Init(9600);               // Initialize UART module at 9600 bps
  Delay_ms(1000);                  // Wait for UART module to stabilize


  while (1) {
  

   if (UART1_Data_Ready()) {      // If data is received,
     uart_rd = UART1_Read();      //   read the received data,
     UART1_Write(uart_rd);

    }
  }
 }

i dont know what the possible reason could be i haev checked the board and i think all connections are fine , please tell any thing if u could suggest.
 

Noggin

Member
I'd be more concerned if there was anything but 1's and 0's.
 

Pommie

Well-Known Member
Most Helpful Member
The fact that data is received when none is being sent suggests the wrong polarity. Or, the OP has both ends set to echo received data.

Mike.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top