Author |
Message |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Tue Dec 14, 2021 9:31 am Subject: LIN bus built-in function source code ? |
Hello,
I managed to get it working.
It just needed two things.
I have to wait the transmit shift register to be empty (TRMT).
So I no longer need to add delay after loading data in the UxP1 ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Mon Dec 13, 2021 12:21 pm Subject: LIN bus built-in function source code ? |
Hello Ttelmah,
I assume that what I sent is right because it seems right on the capture :
https://i.postimg.cc/HxHwTYyV/linbus2.jpg
I just send PID with the U3P1 register and the uart module ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Mon Dec 13, 2021 10:34 am Subject: LIN bus built-in function source code ? |
I was a little too fast....
I'm able to send header break, header sync and PID with my own function or the built in linbus_header() function.
Everything seems to works, the pump wakes up and tra ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Sun Dec 12, 2021 8:50 am Subject: LIN bus built-in function source code ? |
Glad you have it working.
Would suggest you try using the NO INIT option on the #use RS232,
then at the start of the code, wait till the RX line is seen as high, then
init the RS232.
Think what is ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Fri Dec 10, 2021 2:31 pm Subject: LIN bus built-in function source code ? |
Are you trying to use AutoBaud? A master sends the sync for the slave to use. The baud rate of the master should never be changed but it looks like your's is trying to change the baud rate.
No th ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Fri Dec 10, 2021 2:29 pm Subject: LIN bus built-in function source code ? |
Done
Don't know why, but I have to reset and set the U3MODE.UARTEN register bit to reset the uart module in my MCU init routine.
With this trick, the LIN bus is working like a charm eve ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Fri Dec 10, 2021 1:59 pm Subject: LIN bus built-in function source code ? |
Thank you everyone for your help
As specified in datasheet, I have an external 1K pull up resistor on the bus.
The MCU UART module is configured as Master.
I spotted a problem :
ht ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Fri Dec 10, 2021 10:04 am Subject: LIN bus built-in function source code ? |
Hello,
Thank you for your help but I actually forgot to specify my compiler version.
I have the last one ( 5.105 ) and I already check the included example.
I guess I'm doing everything right s ... |
Topic: LIN bus built-in function source code ? |
WalkOver
Replies: 18
Views: 54315
|
Forum: General CCS C Discussion Posted: Fri Dec 10, 2021 8:49 am Subject: LIN bus built-in function source code ? |
Hello,
I'm working on LIN bus to control a LIN water pump (Pierburg CWA400) with a dsPIC33CK MCU and a MCP2021A driver.
I managed to send a command to start the pump, everything is good on scope a ... |
Topic: dsPIC33CK & CH, PCD Wizard and PWM |
WalkOver
Replies: 1
Views: 11617
|
Forum: General CCS C Discussion Posted: Mon Oct 04, 2021 2:08 pm Subject: dsPIC33CK & CH, PCD Wizard and PWM |
Hello,
I would like to use a dsPIC33CK or CH to try this family.
I just checked if PCD wizard supports this family and I have an empty page if I want to choose PWM or capture peripheral.
Is it ... |
Topic: Info for creating TCPIP 24FJ256GA110_registers.h type file |
WalkOver
Replies: 5
Views: 19188
|
Forum: General CCS C Discussion Posted: Thu Aug 05, 2021 9:56 am Subject: Info for creating TCPIP 24FJ256GA110_registers.h type file |
https://ufile.io/kv8lymm9 |
Topic: PCD Bootloader and application from other compiler |
WalkOver
Replies: 7
Views: 24043
|
Forum: General CCS C Discussion Posted: Thu Aug 05, 2021 2:35 am Subject: PCD Bootloader and application from other compiler |
Hello, thank you for your help
I have to dig a bit more.
There are options in the output settings of MikroC compiler but "long hex format" wasn't checked.
I tried with and withou ... |
Topic: PCD Bootloader and application from other compiler |
WalkOver
Replies: 7
Views: 24043
|
Forum: General CCS C Discussion Posted: Wed Aug 04, 2021 12:50 pm Subject: PCD Bootloader and application from other compiler |
This why I migrated from MikroC to CCS
My third problem is my very low level of programming knowledge.
I have a program under mikroC that I can't convert under CCS ( because of my low l ... |
Topic: PCD Bootloader and application from other compiler |
WalkOver
Replies: 7
Views: 24043
|
Forum: General CCS C Discussion Posted: Wed Aug 04, 2021 12:37 pm Subject: PCD Bootloader and application from other compiler |
Hello again,
I printed out the variable "APPLICATION_START" computed by the pcd_bootloader program and it return "4096" or 0x1000
So I used the directive "#pragma orgall ... |
Topic: PCD Bootloader and application from other compiler |
WalkOver
Replies: 7
Views: 24043
|
Forum: General CCS C Discussion Posted: Wed Aug 04, 2021 11:03 am Subject: PCD Bootloader and application from other compiler |
Hello,
I would like to implement a serial bootloader to an application compiled with another compiler ( MikroC from MikroElektronika ).
I tried to compile the CCS bootloader exemple for my targe ... |
|