Author |
Message |
Topic: problem with DS1307 |
P51D
Replies: 2
Views: 4353
|
Forum: General CCS C Discussion Posted: Tue Jun 15, 2010 10:46 am Subject: Re: problem with DS1307 |
hi
I read the time and date the first value that is read is true and the other values are not true.
which other values?
Did you realized that the values are in BCD code?
For year, minutes an ... |
Topic: When I turn On |
P51D
Replies: 14
Views: 13637
|
Forum: General CCS C Discussion Posted: Tue Jun 15, 2010 10:31 am Subject: When I turn On |
I read some pdf but I dont know what will happen in detail if a reset will occur.
google is your friend...
"pic microcontroller"
http://books.google.ch/books?id=CB9GaAU1dwsC&print ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Tue Jun 15, 2010 10:21 am Subject: switch or if/else if |
I've contacted CCS:
After some mails I've send them the source code for testing theirself the problem:
This was the answer:
This message is a reply to CCS e-mail id: 0FC641
The PIC24 does ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Mon Jun 14, 2010 9:33 am Subject: switch or if/else if |
ok.
Now I've made a new test:
Same main, only changed the include from <18F452.h> to <30F6012A.h>.
The first one generates a jump-table, the second one not.
Is this a compiler prob ... |
Topic: pic18f4550 USB problem with win7 |
P51D
Replies: 6
Views: 16069
|
Forum: General CCS C Discussion Posted: Mon Jun 14, 2010 2:52 am Subject: Re: pic18f4550 USB problem with win7 |
the problem is that my pc see the pic as a device, but cannot install the right drivers, so i can't communicate.
Windows install automaticly the default microchip-usb-driver so it could be that it' ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Mon Jun 14, 2010 1:12 am Subject: switch or if/else if |
Now I've tried it with your example and also with another one where in the cases were more code (printf).
The jump-table was nowhere created:
00466: PUSH 23C6
00468: MOV [- ... |
Topic: When I turn On |
P51D
Replies: 14
Views: 13637
|
Forum: General CCS C Discussion Posted: Mon Jun 14, 2010 12:10 am Subject: When I turn On |
The problem is when I turn on the PIC again there is no output and sometimes an error output. It should produce a correct output when you supply voltage to the pic right?
What's the use of #fuse mc ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Sun Jun 13, 2010 10:18 am Subject: switch or if/else if |
This is my test-switch:
the c-file:
for(i=0;i<10;i++){
switch(i){
case 0:
output_toggle(LED_red);
break;
case 1: ... |
Topic: When I turn On |
P51D
Replies: 14
Views: 13637
|
Forum: General CCS C Discussion Posted: Sun Jun 13, 2010 10:07 am Subject: When I turn On |
What about the MCLR?
Do you use it? external Pull-Up-resistor
->
#fuse MCLR
Is the programmer still connected?
What is it for a programmer?
What doesn't work right?
...
Describe the p ... |
Topic: help please to write code |
P51D
Replies: 12
Views: 10314
|
Forum: General CCS C Discussion Posted: Sun Jun 13, 2010 10:03 am Subject: help please to write code |
OK.
how can I send the two temperature sensors are on different ports.
I use a temperature sensor and a smoke sensor. Both sensors are analog, and have an output voltage.
you should to use tw ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Sun Jun 13, 2010 7:36 am Subject: switch or if/else if |
OK, now I've tested more different versions of switch with the result, that all switchs are made with if else if.
There is no performance upgrade if there is no default case and the cases are in li ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Wed Jun 09, 2010 1:56 pm Subject: switch or if/else if |
Switch with 10 cases, and in one case is also a switch with 10 other cases:
No change.
The first list-file part
switch(a){
00A70: PUSH 2430
00A72: MOV [--W15& ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Wed Jun 09, 2010 12:45 pm Subject: switch or if/else if |
ok, I've did it:
.................... switch(a){
00A6C: PUSH 2430
00A6E: MOV [--W15],W0
00A70: LSR W0,#8,W0
00A72: CLR.B 1
00A74: ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Wed Jun 09, 2010 1:19 am Subject: switch or if/else if |
How could I do it, if I need one?
I use the switch for a communication protocol and there it is necessary to have some default-actions.
and what happened when I uses switchs in some cases like thi ... |
Topic: switch or if/else if |
P51D
Replies: 16
Views: 24766
|
Forum: General CCS C Discussion Posted: Tue Jun 08, 2010 12:15 pm Subject: switch or if/else if |
Thank you for the ansver.
Why doesn't the ccs compiler create any jump-table if there is a default-case?
best wishes
P51D |
|