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

Search found 14 matches
CCS Forum Index
Author Message
  Topic: IF statement and push buttons
matt1eg

Replies: 1
Views: 3541

PostForum: General CCS C Discussion   Posted: Wed Mar 18, 2009 7:01 pm   Subject: IF statement and push buttons
Hi

I think I'm just being stupid but I can't get a sub-routine to work as I need it. It is meant to detect what button is pushed and then do something accordingly. All works except one statement. T ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Thu Feb 12, 2009 12:05 pm   Subject: Another SPI problem (CS5463)
Hi

I'm no expert but looking through your code I can see some problems, although I have only worked with PICs and CCS compiler, I am not familiar with uC 'HCS08QG' at all, and are you using CCS com ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Mon Feb 09, 2009 4:17 pm   Subject: Another SPI problem (CS5463)
Thats ok you don't have to worry I will see what happens when I get it doing proper calculations and post an update later this week.
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Mon Feb 09, 2009 3:58 pm   Subject: Another SPI problem (CS5463)
I get 000000. It's either really cold here and I haven't noticed or its not measuring the temperature.

One other thing I did to modify your code was to send a command to start conversions. In the ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Mon Feb 09, 2009 3:38 pm   Subject: Another SPI problem (CS5463)
Oh yeah forgot to mention that I noticed that. Was just getting 0 for a while but then noticed it, I have it as 2 now, this is when I get -128.
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Mon Feb 09, 2009 3:01 pm   Subject: Another SPI problem (CS5463)
Hi

Tested both versions today, yours worked with a little bit of moding. I changed int32 CS5463_read_reg(int8 reg)
{
int8 msb, mid, lsb;
int32 retval;

output_low(CS) ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sun Feb 08, 2009 6:49 pm   Subject: Another SPI problem (CS5463)
Thats superb thanks very much. Wasn't expecting that amount of help Shocked Very Happy .

Will try that out tomorrow as well. If that works then least I know there are no hardware errors. Then I can a ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sun Feb 08, 2009 3:20 pm   Subject: Another SPI problem (CS5463)
I'll delete that line as well then. I will test this tomorrow when I get to the lab, fingers crossed it will work now.

Thanks
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sun Feb 08, 2009 3:00 pm   Subject: Another SPI problem (CS5463)
Hadn't thought about the reset pin at all will sort that. I am (was atleast anyway) planning to put in interrupts thats the only reason I had enabled them, meant to disable them for mean time though. ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sat Feb 07, 2009 3:53 pm   Subject: Another SPI problem (CS5463)
Here is modified code for first mistake

#include <18F4520.H> //PIC Header File
#fuses HS,NOPROTECT,NOBROWNOUT,NOWDT,NOSTVREN,NOLVP,PUT,MCLR,NOPBADEN //Sets fuses
#use delay(clock= ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sat Feb 07, 2009 12:53 pm   Subject: Another SPI problem (CS5463)
If you can I would be very grateful.
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sat Feb 07, 2009 6:09 am   Subject: Another SPI problem (CS5463)
Just thought the setup_spi(SPI_MASTER | SPI_MODE_0 | SPI_CLK_DIV_16); line is setting up the MSSP module isn't it so I was actually trying to do it twice.
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Sat Feb 07, 2009 6:06 am   Subject: Another SPI problem (CS5463)
Hi thanks for your reply. I thought that where I had used #byte I was setting the registers Embarassed . I can fix that. I'm guessing then if they had not been set then the MSSP shouldn't even be enabled ...
  Topic: Another SPI problem (CS5463)
matt1eg

Replies: 31
Views: 62422

PostForum: General CCS C Discussion   Posted: Fri Feb 06, 2009 4:02 pm   Subject: Another SPI problem (CS5463)
Hi

Sorry that its another SPI problem, I have searched through the forum to look for a solution but no luck.

I am using a PIC18F4520 on a Millennium development board with and am trying to conn ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group