CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

arrays

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
atoo



Joined: 31 Jan 2014
Posts: 32

View user's profile Send private message Send e-mail

arrays
PostPosted: Fri Jan 31, 2014 5:26 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Feb 01, 2014 12:14 am     Reply with quote

Use the forum's search page, here:
http://www.ccsinfo.com/forum/search.php
Search for this:
Quote:
8x8 matrix

Make sure that you select this option:
Quote:
Search for all terms
atoo



Joined: 31 Jan 2014
Posts: 32

View user's profile Send private message Send e-mail

PostPosted: Sat Feb 01, 2014 5:49 pm     Reply with quote

thank you!
atoo



Joined: 31 Jan 2014
Posts: 32

View user's profile Send private message Send e-mail

thank you, I'm trying do of this way
PostPosted: Sat Feb 01, 2014 6:00 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Feb 02, 2014 11:31 am     Reply with quote

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

View user's profile Send private message Send e-mail

TUDO BEM?
PostPosted: Sun Feb 02, 2014 9:27 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 03, 2014 9:53 am     Reply with quote

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

View user's profile Send private message Send e-mail

arrays
PostPosted: Wed Feb 05, 2014 10:57 pm     Reply with quote

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 Question
// brother would like to consume little memory RAM Question
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

View user's profile Send private message

PostPosted: Thu Feb 06, 2014 2:00 am     Reply with quote

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....

Smile
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

Re: arrays
PostPosted: Thu Feb 06, 2014 5:21 am     Reply with quote

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

View user's profile Send private message Send e-mail

atoo
PostPosted: Thu Feb 06, 2014 8:25 pm     Reply with quote

I understand now thanks to all
moderator can close the topic


problem solved !!


earned personal !!


thank you! Surprised


Charles francês joao pessoa PB
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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