Author |
Message |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Mon May 12, 2008 7:52 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
hello everyone....
here's the final code that works for my MAX7318 Switch and LED application....
void see_switch()
{
while ( 1 )
{
i2c_start( ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Fri May 09, 2008 12:22 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
by the way, here is the schematic diagram...i hope this link works....
http://img3.freeimagehosting.net/uploads/635658f19e.jpghttp://img505.imageshack.us/img505/3051/picux8.th.jpg |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Thu May 08, 2008 2:03 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
thanks, PCM Programmer....
i already tried that one but it's not working on my case. that would have made things quite easier....i don't know what is wrong but it just won't work.
are the ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Wed May 07, 2008 7:27 pm Subject: cannot read from an input (switch) over i2c...(SOLVED) |
it worked!
here is the final code that can successfully display the bytes (in read mode) of MAX7318 in the LCD display.
byte setme[5]={0xFE,0xFD,0xFB,0xF ... |
Topic: Compiler won't allow array[10][10] |
elizabeth ann
Replies: 10
Views: 7377
|
Forum: General CCS C Discussion Posted: Mon May 05, 2008 4:02 am Subject: Compiler won't allow array[10][10] |
really? how come i can't compile a simple code as that?
it always halts with the same error..
by read-only you do mean that everything is lost on a power failure, am i right? but i n ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Mon May 05, 2008 12:39 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
sorry for the delayed response...
i will try that code right away, sir
and be back in a few minutes with good news, i hope
thank you very much. |
Topic: Compiler won't allow array[10][10] |
elizabeth ann
Replies: 10
Views: 7377
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 5:10 am Subject: Compiler won't allow array[10][10] |
tried inserting that line:
#device *=16
but still can't create a 2x50-sized array...
how about migrating the code to some PIC18 chip? would that be too troublesome or not at all.............? ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 5:04 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
ooops....
i think i have a little problem posting my scanned schematic diagram....
sorry but how do i post a JPEG picture in this forum?
really sorry....the "insert image" did not w ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 4:53 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
tried that a few minutes ago...
i created two separate programs. here are the results:
the MAX7318 of the LED is working fine. i can successfully write to it as to which LEDs will be turned ON o ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 3:01 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
i2c_start();
I noticed another problem. These MAX7318 chips power-up with all
the i/o pins configured as input pins. You have to write to a config
register, to turn them into output pins. You ... |
Topic: Compiler won't allow array[10][10] |
elizabeth ann
Replies: 10
Views: 7377
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 2:32 am Subject: Compiler won't allow array[10][10] |
On the 16 chips, arrays _must_ fit into a single bank. On the 16F877, there are no 'full size' banks. Instead, it has 96 bytes in the first bank, 80 bytes in the second, and 96 bytes each, in the thir ... |
Topic: Compiler won't allow array[10][10] |
elizabeth ann
Replies: 10
Views: 7377
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 1:40 am Subject: Compiler won't allow array[10][10] |
i have a simple question.....
how can i create a 10x10 byte matrix? my compiler does not allow me to create an array with that size and instead goes into error that says:
NOT ENOUGH RAM AVAILA ... |
Topic: pic16f877a + ds1307 dont work |
elizabeth ann
Replies: 5
Views: 6087
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 1:21 am Subject: pic16f877a + ds1307 dont work |
in our project we used a TCXO from Maxim which is the DS32kHz. perhaps you are only using an ordinary crystal oscillator which may not be stable at all times. the DS32kHz is temperature-compensated so ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Sun May 04, 2008 12:48 am Subject: cannot read from an input (switch) over i2c...(SOLVED) |
Here are the pin connections:
APPLICATION TYPE SLAVE ADDRESS AD0 AD1 AD2
LED indicator output 0x32 SDA SCL GND
Switch input 0xA0 ... |
Topic: cannot read from an input (switch) over i2c...(SOLVED) |
elizabeth ann
Replies: 20
Views: 20558
|
Forum: General CCS C Discussion Posted: Fri May 02, 2008 11:47 pm Subject: cannot read from an input (switch) over i2c...(SOLVED) |
edited the code with a few modifications...
BYTE byte1, byte2;
do
{
i2c_start();
i2c_write(0xA0);
i2c_write(0x02);
i2c_start(); ... |
|