View previous topic :: View next topic |
Author |
Message |
scanan
Joined: 13 Aug 2004 Posts: 69 Location: Turkey
|
|
Posted: Fri May 09, 2025 7:53 am |
|
|
temtronic wrote: | curious....
you've made several changes so could you please post the program and the printout ?
thanks |
set_tris_a(0b00001000); //0x08
set_tris_b(0b11000100); //0xC4
set_tris_c(0b10100000); //0xA0
set_tris_d(0b00000000); //0x00
set_tris_e(0b00001000); //0x08
TX and RX are situated at pinc6 and c7 respectively
#use delay(clock=64000000,RESTART_WDT)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,ERRORS)
void version(void)
{
//------------------------------------------------------------------------------
//-- firmware version
//------------------------------------------------------------------------------
printf("\r\nTelemmote Receiver\r\n");
printf("TLM-02\r\n");
printf("Firmware v1.00\r\n");
printf("Compiled on \r\n");
printf(__DATE__);
printf("\r\n");
printf(__TIME__);
printf("\r\n");
//------------------------------------------------------------------------------
}
should work flawlesly but result is
U V W $ Y YZ Y C irmware v1.00
Compiled on
07-May-25
11:20:24 _________________ Dr Suleyman CANAN
R&D Electronic Engineer
https://suleymancanan.wordpress.com
Do whatever you do with amateur spirit -
But always feel professional. |
|
 |
temtronic
Joined: 01 Jul 2010 Posts: 9475 Location: Greensville,Ontario
|
|
Posted: Fri May 09, 2025 9:13 am |
|
|
Hmm....you don't have the 'delay_ms(250);' just before the first print. |
|
 |
allenhuffman
Joined: 17 Jun 2019 Posts: 621 Location: Des Moines, Iowa, USA
|
|
Posted: Fri May 09, 2025 9:54 am |
|
|
One of the four PIC24 boards I maintain had an issue with unreliable serial output, and it ended up being caused by a timer ISR. I had to move it to a different timer and then the output worked fine.
I have no idea why that was, but left myself a TODO in the comments to look into it... some day. _________________ Allen C. Huffman, Sub-Etha Software (est. 1990) http://www.subethasoftware.com
Embedded C, Arduino, MSP430, ESP8266/32, BASIC Stamp and PIC24 programmer.
http://www.whywouldyouwanttodothat.com ?
Using: 24FJ256GA106, 24EP256GP202 and 24FJ64GA002. |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19832
|
|
Posted: Fri May 09, 2025 11:38 am |
|
|
Show your fuses.
How is the 64MHz generated????.
Show how the main code starts, and calls 'version'.
Did PUT make no difference at all?. |
|
 |
temtronic
Joined: 01 Jul 2010 Posts: 9475 Location: Greensville,Ontario
|
|
Posted: Fri May 09, 2025 2:44 pm |
|
|
we really need to see the complete program ! |
|
 |
Ttelmah
Joined: 11 Mar 2010 Posts: 19832
|
|
Posted: Fri May 09, 2025 11:54 pm |
|
|
More to the point, you really need to generate a basic test program that just
shows the issue. Simple main, and the code to call the version display.
Doing this then proves there isn't something hidden causing the issue as
Allen describes. Then post this. |
|
 |
|