Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About kittysoman

  • Rank

Contact Methods

  • Website URL

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi I am trying to print a rom string to the serial port, the strings are defined thus: rom char *test_txt = "\n\rMatrix Controller Test mode\n\r"; rom char *txt1 = "Connect an 80R 10W resistor across pins 11 and 19\n\r"; rom char *txt2 = "Press Enter when ready\n\r"; i use the following call: puts (test_txt); where puts() is: void puts(rom char* c) { char cc; char i; for( i = 0; cc = c[ i ]; i++ ) putc( cc ); } void putc(char c) { txsta.TXEN = 1; txreg = c; while (txsta.TRMT == 0) clear_wdt(); } But all of the strings are printed one after the other and then looping to the start again until the 255 char limit is reached, it appears that the routine isn't detecting the end of string \0 - i also tried putting a \0 at the end os each string, I have checked the prog mem and each rom strings ends in a retlw 0 Can anyone tell me what I'm doing wrong, i'm using a pic16F887 processor, the above code works fine on a pic 18F25 series chip regards rob carter ------------------------------------------------------------------------------------------------------ Công ty Dịch vụ chăm sóc sau sinh bệnh viện Hùng Vương chuyên nghiệp giúp việc theo giờ chất lượng giúp việc theo giờ tại gò vấp hiệu quả
  • Create New...