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 16 matches
CCS Forum Index
Author Message
  Topic: How can i make here an subroutine to reduce code size?
Alex N

Replies: 6
Views: 10814

PostForum: General CCS C Discussion   Posted: Mon Feb 27, 2006 8:32 am   Subject: How can i make here an subroutine to reduce code size?
Rwyoung, thank you for the useful information. It turned out, that my compiler (as opposed to the help index) also supports output_toggle function.
  Topic: How can i make here an subroutine to reduce code size?
Alex N

Replies: 6
Views: 10814

PostForum: General CCS C Discussion   Posted: Mon Feb 27, 2006 8:17 am   Subject: How can i make here an subroutine to reduce code size?
[spam], if you press the 1 key and RELAIS_K1 is low, !input(RELAIS_K1) is high, which is placed to RELAIS_K1. Pay attention to !input.
  Topic: How can i make here an subroutine to reduce code size?
Alex N

Replies: 6
Views: 10814

PostForum: General CCS C Discussion   Posted: Mon Feb 27, 2006 7:48 am   Subject: How can i make here an subroutine to reduce code size?
Try to use

case 'x':
output_bit(RELAIS_Kx,!input(RELAIS_Kx));
break;

where 1, 2, 3 and 4 should be instead of x.
  Topic: Interrupt Priority Settings
Alex N

Replies: 7
Views: 13527

PostForum: General CCS C Discussion   Posted: Mon Feb 27, 2006 7:42 am   Subject: Interrupt Priority Settings
My version of compiler 3.222 has no HIGH option. So, it's time to think about version update. Smile
  Topic: Interrupt Priority Settings
Alex N

Replies: 7
Views: 13527

PostForum: General CCS C Discussion   Posted: Wed Feb 22, 2006 7:39 am   Subject: Interrupt Priority Settings
Thushi, here are a bit different interrupts, but the code shows, how to set priorities.


#include <18F1320.h>
#device HIGH_INTS=TRUE
#fuses HS
#fuses BORV42, BROWNOUT, PUT
#fuses NOWDT
...
  Topic: usart config at runtime
Alex N

Replies: 5
Views: 7756

PostForum: General CCS C Discussion   Posted: Wed Feb 15, 2006 8:01 am   Subject: usart config at runtime
This is a similar topic:
http://www.ccsinfo.com/forum/viewtopic.php?t=22062
  Topic: usart config at runtime
Alex N

Replies: 5
Views: 7756

PostForum: General CCS C Discussion   Posted: Tue Feb 14, 2006 10:56 am   Subject: usart config at runtime
Is it enough for your task to make some output streams with different settings and switch between them at runtime?
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:44 pm   Subject: About LIN BUS 2.0
Good luck! Very Happy
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:43 pm   Subject: About LIN BUS 2.0
LIN.c


// LIN Functions

linStatus linSetup(void)
{
OpenUSART(USART_TX_INT_OFF & USART_RX_INT_OFF & USART_ASYNCH_MODE &
USART_EIGHT_BIT & USART_ ...
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:41 pm   Subject: About LIN BUS 2.0
USART.c


// Hardware USART Functions

/********************************************************************
* Function Name: OpenUSART *
* Retur ...
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:40 pm   Subject: About LIN BUS 2.0
Board.c


// PIC Board

void B_FlashOnStart()
{
const int8 FlashTime = 100;
int i = 0;

for(i=0; i<=1; i++)
{
output_high(G2_LED);
...
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:28 pm   Subject: About LIN BUS 2.0
Board.h


// PIC Board

#include <18F4680.h>
#fuses H4, WDT4096, NOPROTECT
#use delay(clock=40000000)

// Settings for RS-232
#use rs232(baud=9600, xmit=PIN_B0, rcv=PIN_B1, ...
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:19 pm   Subject: About LIN BUS 2.0
Main file


// Main program file (LIN)

// Header files
#include "Board.h"

#include "Timers.h"
#include "HW.h"
#include "USART.h"
#include & ...
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Mon Feb 13, 2006 2:17 pm   Subject: About LIN BUS 2.0
Fabri,

A code, which I am giving you now, is for LIN Master node. You can see the LIN Master messages via RS-232 and Serial Port Monitor. It should be repeated sequence

00 55 C4 00 00 FF
00 55 ...
  Topic: About LIN BUS 2.0
Alex N

Replies: 28
Views: 31840

PostForum: General CCS C Discussion   Posted: Sat Feb 11, 2006 5:16 am   Subject: About LIN BUS 2.0
Hi Fabri,

Yes, it's OK. Do you have any tool to monitor LIN bus activity?
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group