Author |
Message |
Topic: Recursion is not permitted?? why is it so?? |
potato
Replies: 7
Views: 20290
|
Forum: General CCS C Discussion Posted: Mon May 19, 2014 3:11 am Subject: Recursion is not permitted?? why is it so?? |
Just return....
Your original code is inside 'select_game', and then calls 'game1'. If you return from game1, you are back in select_game. Classic way to force it to execute again, would be to have ... |
Topic: [solved] crazy about pin RA4 in PIC18F4550 |
potato
Replies: 4
Views: 10055
|
Forum: General CCS C Discussion Posted: Sat May 17, 2014 9:51 am Subject: [solved] crazy about pin RA4 in PIC18F4550 |
hi guys, thanks for you super-fast replies!
I'm afraid I had no reasons to turn crazy... I've realised I had a software problem, because I had a while loop to wait for a button to be presse ... |
Topic: [solved] crazy about pin RA4 in PIC18F4550 |
potato
Replies: 4
Views: 10055
|
Forum: General CCS C Discussion Posted: Sat May 17, 2014 8:59 am Subject: [solved] crazy about pin RA4 in PIC18F4550 |
Hi again!
I've been doing some research here on the forum and I think I'll soon become crazy... My PIC ignores the inputs coming from pin A4 (I have a button there and there are no bouncing problem ... |
Topic: no output voltage? :S |
potato
Replies: 4
Views: 5474
|
Forum: General CCS C Discussion Posted: Wed May 07, 2014 5:50 am Subject: no output voltage? :S |
Hi temtronic, thanks for your reply. I have a couple of doubts about your answer:
Normally you have to disable any/all peripherals that are on any I/O pin you use for simple 'on/off' use. Things li ... |
Topic: no output voltage? :S |
potato
Replies: 4
Views: 5474
|
Forum: General CCS C Discussion Posted: Wed May 07, 2014 3:58 am Subject: no output voltage? :S |
Hi again!
I'm using PIC18F4550 and I have a problem:
I have some leds and buttons connected to the PIC, this way:
-led1: pin a4
-led2: pin a5
-led3: pin c6
-led4: pin c7
(originally, leds 1 ... |
Topic: (Solved) displaying string variables in a 4x20 LCD |
potato
Replies: 10
Views: 14958
|
Forum: General CCS C Discussion Posted: Fri May 02, 2014 9:25 am Subject: (Solved) displaying string variables in a 4x20 LCD |
Rather a waste of space....
You are storing _strings_, rather than characters.
Store characters:
const char letter
I didn't know that!
S, if I only want to store single characters I d ... |
Topic: (Solved) displaying string variables in a 4x20 LCD |
potato
Replies: 10
Views: 14958
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2014 4:14 am Subject: (Solved) displaying string variables in a 4x20 LCD |
For those of you with the same problem, I have more or less worked it out:
const char letter [20][2]={"A","B","C","D","E",&quo ... |
Topic: Recursion is not permitted?? why is it so?? |
potato
Replies: 7
Views: 20290
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2014 4:11 am Subject: Recursion is not permitted?? why is it so?? |
Hi all of you!
I know this thread has ages, but I find myself with the same recursion problem, despite it isn't as clear as in the farizluqman code.
In short:
void select_game (void) ... |
Topic: (Solved) displaying string variables in a 4x20 LCD |
potato
Replies: 10
Views: 14958
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2014 12:18 pm Subject: (Solved) displaying string variables in a 4x20 LCD |
Hi Ttelmah and temtronic, thanks for your quick replies.
1) The program is not working yet -have a look at the 1st message, which has been edited, please.. maybe you know how to display a variable ... |
Topic: (Solved) displaying string variables in a 4x20 LCD |
potato
Replies: 10
Views: 14958
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2014 11:46 am Subject: (Solved) displaying string variables in a 4x20 LCD |
OK, I've seen how to do an array of strings here: http://www.ccsinfo.com/forum/viewtopic.php?t=33182&view=next
Though it's something, how can I choose one in a random mode? |
Topic: (Solved) displaying string variables in a 4x20 LCD |
potato
Replies: 10
Views: 14958
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2014 9:06 am Subject: (Solved) displaying string variables in a 4x20 LCD |
Hi guys!
I want to program a game like Scatergories using a 4x20 LCD and a 18F4550 PIC. (For those of you who don't know the game, you are given a letter and a category and you must think about a w ... |
Topic: #int_TIMER0 for multiplexing 8 displays |
potato
Replies: 9
Views: 15091
|
Forum: General CCS C Discussion Posted: Mon Mar 24, 2014 5:03 pm Subject: #int_TIMER0 for multiplexing 8 displays |
The #int_timer0 doesn't interrupt itself. You get an interrupt, then
the entire code in your #int_timer0 routine executes once, then it exits
the routine. It won't execute that routine again u ... |
Topic: #int_TIMER0 for multiplexing 8 displays |
potato
Replies: 9
Views: 15091
|
Forum: General CCS C Discussion Posted: Mon Mar 24, 2014 5:12 am Subject: #int_TIMER0 for multiplexing 8 displays |
By the way, is it necessary to clear the interrupts or is it automatically done? And what about disable/enable the interrupts in the same interruption?
I've seen hundreds of codes and I've tried t ... |
Topic: #int_TIMER0 for multiplexing 8 displays |
potato
Replies: 9
Views: 15091
|
Forum: General CCS C Discussion Posted: Mon Mar 24, 2014 3:11 am Subject: #int_TIMER0 for multiplexing 8 displays |
Thanks for your comments Ttelmah. Now my .h code is the following:
#include <18F4550.h>
#device adc=8
#FUSES WDT1 //Watch Dog Timer uses 1:1 Postscale
#FUSES XT ... |
Topic: #int_TIMER0 for multiplexing 8 displays |
potato
Replies: 9
Views: 15091
|
Forum: General CCS C Discussion Posted: Sun Mar 23, 2014 2:12 pm Subject: #int_TIMER0 for multiplexing 8 displays |
Post this file: prova_comptador.h
In fact I haven't edited this file, it is automatically created... The quartz crystal that I'm using is a 4 MHz one.
#include <18F4550.h>
#device adc=8
... |
|