Author |
Message |
Topic: Are pointers to functions still not supported in CCS PIC C? |
matrixofdynamism
Replies: 2
Views: 8174
|
Forum: General CCS C Discussion Posted: Sun Jul 03, 2016 1:22 pm Subject: Are pointers to functions still not supported in CCS PIC C? |
I have written some code that uses a function pointer, it is assigned a value in a C language switch block and the function pointed to is called after the switch block.
The code does not compile. A ... |
Topic: Program won't compile with call to rcv_buffer_bytes() |
matrixofdynamism
Replies: 4
Views: 12465
|
Forum: General CCS C Discussion Posted: Sun Jul 03, 2016 8:24 am Subject: Program won't compile with call to rcv_buffer_bytes() |
I am using CCS C version 5.015 IDE.
I have found that serial port has function rcv_buffer_bytes() to determine how many bytes are in the receive buffer. I am using PIC18F87K22. In the header file o ... |
Topic: How to use #INT_RDA with PIC18F with 2 EUSARTs inside? |
matrixofdynamism
Replies: 8
Views: 20811
|
Forum: General CCS C Discussion Posted: Fri Jun 03, 2016 7:12 am Subject: Re: Note using UART1 |
The interrupt routine MUST read the character.
Really? This means that if I set a flag in the interrupt and use the main subroutine to read the character (similar to using kbhit for polling), the p ... |
Topic: How to use #INT_RDA with PIC18F with 2 EUSARTs inside? |
matrixofdynamism
Replies: 8
Views: 20811
|
Forum: General CCS C Discussion Posted: Thu Jun 02, 2016 4:09 am Subject: Note using UART1 |
I am only using the UART2 since I am forced to do so. UART1 of the PIC is not connected to the MAX232 chip.
Also, it seems rather unfortunate that both the UARTs are to be serviced via #INT_RDA, ve ... |
Topic: How to use #INT_RDA with PIC18F with 2 EUSARTs inside? |
matrixofdynamism
Replies: 8
Views: 20811
|
Forum: General CCS C Discussion Posted: Wed Jun 01, 2016 7:52 pm Subject: How to use #INT_RDA with PIC18F with 2 EUSARTs inside? |
I have a PIC18F MCU that has 2 EUSART inside.
I have written this code:
#include <main.h>
volatile unsigned int16 bcount = 0;
volatile bool brx = FALSE;
#INT_RDA1
void RDA_isr( ... |
Topic: How to locate a union at a specific location in memory? |
matrixofdynamism
Replies: 25
Views: 47315
|
Forum: General CCS C Discussion Posted: Tue Apr 05, 2016 1:44 am Subject: How to locate a union at a specific location in memory? |
hmm, I thought that the #spi was for "software SPI" i.e bit-banging as it is called and setup_spi() was for hardware spi. So that is not true?
RF_Developer, if the bit_clear and I suppose ... |
Topic: CCS listing file gives assembly with raw addresses only? |
matrixofdynamism
Replies: 4
Views: 12732
|
Forum: General CCS C Discussion Posted: Tue Apr 05, 2016 1:42 am Subject: CCS listing file gives assembly with raw addresses only? |
Oh, I thought that was intrinsic.
I am using CCS PIC C Compiler. |
Topic: CCS listing file gives assembly with raw addresses only? |
matrixofdynamism
Replies: 4
Views: 12732
|
Forum: General CCS C Discussion Posted: Mon Apr 04, 2016 5:58 pm Subject: CCS listing file gives assembly with raw addresses only? |
Here is an output from spi_write() function:
000A4: MOVFF 06,0A
000A8: MOVF FC9,W
000AA: MOVFF 06,FC9
000AE: RRCF FC7,W
000B0: BNC 00AE
I only see address values and no SFR name ... |
Topic: How to locate a union at a specific location in memory? |
matrixofdynamism
Replies: 25
Views: 47315
|
Forum: General CCS C Discussion Posted: Mon Apr 04, 2016 5:17 pm Subject: How to locate a union at a specific location in memory? |
I got the DAC to work finally. However, I was held for a while. This is my first time using SPI on the PIC in actuality. The DAC would not do anything and after looking at the waveforms by sending 0x0 ... |
Topic: How to locate a union at a specific location in memory? |
matrixofdynamism
Replies: 25
Views: 47315
|
Forum: General CCS C Discussion Posted: Mon Apr 04, 2016 7:13 am Subject: How to locate a union at a specific location in memory? |
The DAC is MCP4801. The don't care bits must be after the data so I guess I shall have to put them this way in the struct also. See Figure 5-3 in http://ww1.microchip.com/downloads/en/DeviceDoc/22244B ... |
Topic: How to locate a union at a specific location in memory? |
matrixofdynamism
Replies: 25
Views: 47315
|
Forum: General CCS C Discussion Posted: Mon Apr 04, 2016 5:52 am Subject: How to locate a union at a specific location in memory? |
I have used bitfields in the past but only on rare occasions. I have not tried to fully understand how to use them as I was programming in C++ and VHDL. In my present situation though I am trying to f ... |
Topic: What is the difference between #byte and #locate? |
matrixofdynamism
Replies: 6
Views: 14363
|
Forum: General CCS C Discussion Posted: Mon Apr 04, 2016 5:43 am Subject: What is the difference between #byte and #locate? |
When you say that the useage has declined, does it mean it has declined specifically in CCS PIC C compiler? Why is that so? |
Topic: How to locate a union at a specific location in memory? |
matrixofdynamism
Replies: 25
Views: 47315
|
Forum: General CCS C Discussion Posted: Sun Apr 03, 2016 5:29 pm Subject: OK I will write test programs |
I will write test programs and get to the bottom of this. When you say that what holds for one PIC may not hold for another, does that refer to PIC families like PIC10, PIC16, PIC18, PIC24, dsPIC e.t. ... |
Topic: What is the difference between #byte and #locate? |
matrixofdynamism
Replies: 6
Views: 14363
|
Forum: General CCS C Discussion Posted: Sun Apr 03, 2016 5:25 pm Subject: What is the difference between #byte and #locate? |
Both seem to be doing the same thing, so what is the difference between them since if these are 2 separate preprocessor directives, there must be things unique about them, |
Topic: How to locate a union at a specific location in memory? |
matrixofdynamism
Replies: 25
Views: 47315
|
Forum: General CCS C Discussion Posted: Sun Apr 03, 2016 2:41 pm Subject: How to locate a union at a specific location in memory? |
how does one do the following:
(1) How do I create a constant value of arbitrary bit length in this struct e.g how to have two permanent high bits between CKP and SSPEN?
(2) If the struct is not ... |
|