Author |
Message |
Topic: Receiving buffer address setup when using ADC to DMA |
naughty_mark
Replies: 1
Views: 7199
|
Forum: General CCS C Discussion Posted: Tue Jan 31, 2017 5:32 pm Subject: Receiving buffer address setup when using ADC to DMA |
Hi Guys,
I am using dsPIC33ECP512MU814 micro with CCS compiler v5.0.30.
What I am trying to do is read 8 ADC channels (4 channels Simultaneously each time) and let DMA fill those readings to my bu ... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Tue Jul 08, 2014 1:03 am Subject: Question about built_in function input_state(SOLVED) |
Very valuable point, Ttelmah. I will be wary of that and do explicit cast just in case like you said.
I do appreciate your great help and I learnt a lot.
Kind Regards
Mark |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Sun Jul 06, 2014 5:20 pm Subject: Question about built_in function input_state(SOLVED) |
Thanks Ttelmah. That makes sense. I do appreciate for your help~ |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 4:32 pm Subject: Question about built_in function input_state(SOLVED) |
No.
That's why I made it a _pointer_ to an 'int16'.
The compiler then knows it is dealing with an int16 value.
Yes, Ttelmah. You are right. If you use pointer to int16, then that should be ... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 1:04 am Subject: Question about built_in function input_state(SOLVED) |
Whoops~~So that means I don't need to take care of the pin number and its masking, that is very good, I will use that. Thanks for your help, Ttelmah.
EDIT: I just doubt if that bit_test gonn ... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Thu Jul 03, 2014 12:36 am Subject: Question about built_in function input_state(SOLVED) |
_char_ bitmask......
Thanks Ttelmah,
I just got it works, my previous code has a bug in it. Just re-put it on.
char input_pin_state(int16 ccs_pin)
{
int16 io_port;
cha ... |
Topic: Question about LCD display (most likely to be interrupts) |
naughty_mark
Replies: 15
Views: 21681
|
Forum: General CCS C Discussion Posted: Wed Jul 02, 2014 10:58 pm Subject: Question about LCD display (most likely to be interrupts) |
Hi HWGonly1
I am also a newbee or say a little old newbee with CCS compiler. Not sure for your question, but:
1. It is better you tell people what microcontroller you are using and what is the v ... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Wed Jul 02, 2014 10:51 pm Subject: Question about built_in function input_state(SOLVED) |
Hi guys,
I just tried the method in that thread provided by "ckielstra", it works.
Shift that number right to 3 bits means divided by 8, which will give us the port address, just a littl ... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Wed Jul 02, 2014 9:35 pm Subject: Question about built_in function input_state(SOLVED) |
Hi guys,
I searched that thread, and the last second poster by ckielstra is useful, but I am still not sure if it works for dsPIC33EP512MU814.
http://www.ccsinfo.com/forum/viewtopic.php?t=46396
... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Wed Jul 02, 2014 9:02 pm Subject: Question about built_in function input_state(SOLVED) |
compiler is telling you it expects a constant for input_state()'s
argument. it is only able to accept a "pin" argument as a CONST at compile time, not in runtime with VARS .
you have fe ... |
Topic: Question about built_in function input_state(SOLVED) |
naughty_mark
Replies: 14
Views: 19164
|
Forum: General CCS C Discussion Posted: Wed Jul 02, 2014 7:28 pm Subject: Question about built_in function input_state(SOLVED) |
Hi everyone,
I am using dsPIC33EP512MU814 with CCS compiler v5.016
What I am trying to do is to read the states of pins and then process. For easy coding, I put the pins I want to read in a arra ... |
Topic: Question about using a pointer to a structure |
naughty_mark
Replies: 4
Views: 6335
|
Forum: General CCS C Discussion Posted: Sun Jun 15, 2014 4:14 pm Subject: Question about using a pointer to a structure |
OK.
I don't think you can declare the pointers at compile time.
Historically, CCS didn't support this at all.
Then with V5, they started allowing it for 'variables', so an array name could be p ... |
Topic: Question about using a pointer to a structure |
naughty_mark
Replies: 4
Views: 6335
|
Forum: General CCS C Discussion Posted: Thu Jun 12, 2014 4:37 pm Subject: Question about using a pointer to a structure |
Key is in the understanding that there are two address spaces.
Hence the compiler has to _know_ that a pointer to rom, _is_ a pointer to rom....
So it allows a pointer to be declared as:
unsi ... |
Topic: Question about using a pointer to a structure |
naughty_mark
Replies: 4
Views: 6335
|
Forum: General CCS C Discussion Posted: Thu Jun 12, 2014 12:28 am Subject: Question about using a pointer to a structure |
Hi guys,
I know the question must be silly and I always get confused when I play with pointer (In fact, the pointer play with me!). I searched this forum and didn't get my answer.
I am using dsPIC ... |
Topic: led is off,programming successful...help pls.. |
naughty_mark
Replies: 12
Views: 11919
|
Forum: General CCS C Discussion Posted: Wed Jun 11, 2014 5:41 pm Subject: led is off,programming successful...help pls.. |
I am not sure if am I right, but at least you need to initialize the hardware such as tell uC the port direction and after that, you could disconnect the led, just use multimeter to measure i ... |
|