|
|
View previous topic :: View next topic |
Author |
Message |
atoo
Joined: 31 Jan 2014 Posts: 32
|
arrays |
Posted: Fri Jan 31, 2014 5:26 pm |
|
|
I'm Brazilian,
and practice the language ccs.
My doubt is about arrays.
How to do the picture with using 8x8 LED arrays?
Thank you all.
Can someone post an example ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
|
Posted: Sat Feb 01, 2014 5:49 pm |
|
|
thank you! |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
thank you, I'm trying do of this way |
Posted: Sat Feb 01, 2014 6:00 pm |
|
|
Code: | #include <16f88.h>
#fuses XT,NOWDT,NOLVP,PUT,NOBROWNOUT
#use delay(clock=4000000)
#define max 50
#use fast_io(a)
#use fast_io(b)
int i,j,min=0,maxi=8,cont=0;
int const data[208]=//not ! |
with arrays I want understood?
Code: | {48,120,204,204,252,204,204,204,248,204,204,248,248,204,204,248,252,
192,192,192,192,192,192,252,240,200,204,204,204,204,200,240,252,192,192,240,240,192,192,252,252,
192,192,240,240,192,192,192,60,64,192,192,216,204,204,248,204,204,204,204,252,204,204,204,252,
48,48,48,48,48,48,252,252,48,48,48,48,48,176,224,196,200,208,224,208,204,204,204,192,
192,192,192,192,192,192,252,238,214,214,198,198,198,198,198,196,228,244,212,212,204,204,196,48,
204,204,204,204,204,204,48,248,204,204,204,248,192,192,192,56,196,196,196,196,212,200,52,248,
204,204,204,248,208,200,196,120,204,192,192,120,12,12,248,252,48,48,48,48,48,48,48,204,
204,204,204,204,204,204,120,204,204,204,204,204,204,72,48,198,198,198,198,198,214,214,238,132,
132,72,48,48,72,132,132,204,204,204,120,48,48,48,48,252,252,8,16,32,64,252,252};
//int enie[8]={56,196,228,244,212,204,204,196};
void main() |
|
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Sun Feb 02, 2014 11:31 am |
|
|
1) What are you trying to do?
2) Are you using REAL hardware or SIMULATION.
3) Show us a schematic or list pin connections.
4) Read CCS forum guideline.
5) Which compiler version are you using.
Mike |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
TUDO BEM? |
Posted: Sun Feb 02, 2014 9:27 pm |
|
|
eu estou usando CCS C 4.114
I wonder if it is possible
make an array or image to be recognized
using an A / D ??
shot in then a photograph and in then compares images
Last edited by atoo on Thu Feb 06, 2014 12:01 am; edited 1 time in total |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Mon Feb 03, 2014 9:53 am |
|
|
1) What is your coding experience?
2) Have you tried any of the CCS examples?
3) Are you using real hardware or computer simulation?
Mike |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
arrays |
Posted: Wed Feb 05, 2014 10:57 pm |
|
|
yes, I've used proteus.
My language is practiced in this multiplexing.
How to avoid the consumption of memory RAM ?
Put const consume little memory? in int?
//irmão gostaria de consumir pouca memória RAM
// brother would like to consume little memory RAM
atoo
Last edited by atoo on Fri Feb 07, 2014 1:22 pm; edited 1 time in total |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Thu Feb 06, 2014 2:00 am |
|
|
Yes, you can use 'const'.
Beware though, on your chip, you can't construct pointers to data contained in ROM (your chip does not have the ability to do this). When you use 'const', the compiler actually generates a small program that will when called with an 'address', return the value required from this address. So your code as shown will work, but some more complex constructions won't.
Why not just test things?.
Seriously, beware of Proteus. It can be very misleading about what will and won't work when dealing with the PIC hardware. On your chip unlikely to be a problem, but on more complex chips it habitually will tell you things won't work (that do in real chips), and that things will work (that can't...). This is why there is the 'sticky' at the top of the forum telling people that we won't answer Proteus questions....
|
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
Re: arrays |
Posted: Thu Feb 06, 2014 5:21 am |
|
|
atoo wrote: | yes, I've used proteus. | Proteus / ISIS questions are banned on this forum.
Get some real hardware and have a play with it.
You will learn a lot more.
If/when you get stuck someone here will be willing to help.
Mike |
|
|
atoo
Joined: 31 Jan 2014 Posts: 32
|
atoo |
Posted: Thu Feb 06, 2014 8:25 pm |
|
|
I understand now thanks to all
moderator can close the topic
problem solved !!
earned personal !!
thank you!
Charles francês joao pessoa PB |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|