Author |
Message |
Topic: Interrupt control problem - BAM example |
spark
Replies: 13
Views: 15745
|
Forum: General CCS C Discussion Posted: Thu Jan 05, 2012 5:18 pm Subject: Interrupt control problem - BAM example |
Finally I got a working example. The difference between the LED's is not that big (and not I think not linear yet, but I'll change that). Eventually I'll take the 16 bit timer (but use just 10 bits) t ... |
Topic: Interrupt control problem - BAM example |
spark
Replies: 13
Views: 15745
|
Forum: General CCS C Discussion Posted: Thu Jan 05, 2012 10:18 am Subject: Interrupt control problem - BAM example |
I'm using BAM because it allows me to set individual brightness levels for each LED. I don't think that this is possible with PWM.
I'm using the internal oscillator which provides a maximum freque ... |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 4:35 pm Subject: Setting LATCH outputs with 8 bit binary |
Thanks. It's working now. |
Topic: Interrupt control problem - BAM example |
spark
Replies: 13
Views: 15745
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 4:09 pm Subject: Interrupt control problem - BAM example |
ok, thanks for the links. I will make a more advanced search (though I was usually successful with my method - but for now I'll try more keywords). I was struggling with the code I found (in the links ... |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 3:11 pm Subject: Setting LATCH outputs with 8 bit binary |
Thanks for pointing it out. I had a look at the reference Manual (around page 40), but I still don't know it. Do I need to use const? Sorry for that, but I have no idea. Please tell me.... |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 2:47 pm Subject: Setting LATCH outputs with 8 bit binary |
baaad...#include "18F4550.H"
#include <math.h>
#use standard_io(B)
#use delay (internal=1000000)
#fuses INTXT
#byte LATB=getenv("SFR:LATB") ... |
Topic: Interrupt control problem - BAM example |
spark
Replies: 13
Views: 15745
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 2:03 pm Subject: Interrupt control problem - BAM example |
???
I asked google for "BAM C code examples". It didn't bring up anything useful at all. I checked the first five links though I doubted that it could be useful. In fact it showed C code bu ... |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 11:40 am Subject: Setting LATCH outputs with 8 bit binary |
Thanks for helping.
It was now working with
int8 j[] = {10001000,01110001};
int32 i = 500;
int16 k;
int32 z = 65536;
void main(void)
{
while (1& ... |
Topic: Interrupt control problem - BAM example |
spark
Replies: 13
Views: 15745
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 11:39 am Subject: Interrupt control problem - BAM example |
Hello
I'm trying to create 8 independently dimming LED's with BAM.
(
I'm struggling with the code, at the moment the interrupts are creating problems. The idea is to make 8 interrupts, each is ... |
Topic: Creating an array |
spark
Replies: 7
Views: 9375
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 7:46 am Subject: Creating an array |
I am now using a one-dimensional array of bytes. |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Wed Jan 04, 2012 3:06 am Subject: Setting LATCH outputs with 8 bit binary |
If I am using the following code, nothing at all happens. If I remove output_b, I'm able to see all LED dimming a bit. Any ideas?
#include "18F4550.H"
#include <math.h>
#use sta ... |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Tue Jan 03, 2012 6:19 pm Subject: Setting LATCH outputs with 8 bit binary |
Now I am using
int8 j[] = {10000000,00000001};
int32 i = 500;
int32 z = 65536;
what is working. But I don't know why LATB= doesn't work. Any ideas? |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Tue Jan 03, 2012 5:44 pm Subject: Setting LATCH outputs with 8 bit binary |
I was there before I posted the other message. I read it. I didn't understand anything. Now I read it again. All I can see are some strange odd things like enum, union, struc. Nothing like a simple ba ... |
Topic: Setting LATCH outputs with 8 bit binary |
spark
Replies: 20
Views: 23962
|
Forum: General CCS C Discussion Posted: Tue Jan 03, 2012 4:53 pm Subject: Setting LATCH outputs with 8 bit binary |
The code I'm using:
#include "18F4550.H"
#include <math.h>
#use standard_io(B)
#use delay (internal=1000000)
#fuses INTXT
#byte LATB=getenv("SFR:LA ... |
Topic: Creating an array |
spark
Replies: 7
Views: 9375
|
Forum: General CCS C Discussion Posted: Tue Jan 03, 2012 3:26 pm Subject: Creating an array |
Hello
Is there any possibility to set up an array?
I tried it with the following line, but I failed.
const bit j[][] = {{1,0,0,0,0,0,0,0},{0,1,0,0,0,0,0,0} ... |
|