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 9 matches
CCS Forum Index
Author Message
  Topic: problem delay function by timer0
NePe

Replies: 11
Views: 17288

PostForum: General CCS C Discussion   Posted: Sun Aug 12, 2012 7:43 pm   Subject: problem delay function by timer0

void my_delay(int8 time) {
set_timer0(0);
while(get_timer0()!=time);
}


Its simply checks the timer value until its reach the value of the time ...
  Topic: 18f14k50 USB This device cannot start. (Code 10) error
NePe

Replies: 3
Views: 9528

PostForum: General CCS C Discussion   Posted: Sun Aug 12, 2012 3:13 pm   Subject: 18f14k50 USB This device cannot start. (Code 10) error
Thanks for your help.

I google it and find a driver that works:
http://www.recursion.jp/avrcdc/lowbulk.html

avrcdc_inf.zip
  Topic: problem delay function by timer0
NePe

Replies: 11
Views: 17288

PostForum: General CCS C Discussion   Posted: Sun Aug 12, 2012 2:57 pm   Subject: problem delay function by timer0
Are you using external clock for timer0?

Try something like that:

void my_delay(int16 time) {
set_timer0(0);
while(get_timer0()!=time);
}
  Topic: 18f14k50 USB This device cannot start. (Code 10) error
NePe

Replies: 3
Views: 9528

PostForum: General CCS C Discussion   Posted: Sun Aug 12, 2012 1:12 pm   Subject: 18f14k50 USB This device cannot start. (Code 10) error
Hi!

I'm testing the 18f14k50 low speed usb with 6 MHz resonator.
When I attach the device to the pc the following error code is displayed in the device manager after the driver install in win7:
T ...
  Topic: mmcsd driver mmcsd_crc16 function alway return 1
NePe

Replies: 4
Views: 6462

PostForum: General CCS C Discussion   Posted: Tue Apr 24, 2012 11:30 am   Subject: mmcsd driver mmcsd_crc16 function alway return 1
The asm version of the c code:


if ((c ^ crc) & 0x8000) {
331C: MOVF xCD,W
331E: XORWF xD0,W
3320: MOVWF xD2
3322: MOVF xD1,W
3324: MO ...
  Topic: mmcsd driver mmcsd_crc16 function alway return 1
NePe

Replies: 4
Views: 6462

PostForum: General CCS C Discussion   Posted: Tue Apr 24, 2012 10:05 am   Subject: mmcsd driver mmcsd_crc16 function alway return 1
I want to use the mmcsd driver with crc but, the crc16 function always return 1.

The source of the function:

uint16_t mmcsd_crc16(char *data, uint8_t length)
{
uint8_t i, ibit, ...
  Topic: PIC18LF14K50 with compiler 4.120 bug ?
NePe

Replies: 5
Views: 7911

PostForum: General CCS C Discussion   Posted: Tue Jun 21, 2011 10:36 pm   Subject: PIC18LF14K50 with compiler 4.120 bug ?
Hi, you are right!

The problem is the LP fuse instead of INTRC_IO.

As i mentioned i'm tested the RA5 as input when the LP fuse is used and it reads the correct value:


#include <18LF14K5 ...
  Topic: PIC18LF14K50 with compiler 4.120 bug ?
NePe

Replies: 5
Views: 7911

PostForum: General CCS C Discussion   Posted: Tue Jun 21, 2011 6:40 pm   Subject: PIC18LF14K50 with compiler 4.120 bug ?
Here it is:


#include <18LF14K50.h>

#FUSES WDT512, CPUDIV1, LP, NOPLLEN, NOPCLKEN, BORV30, NOIESO, NOMCLR, NOLVP, BBSIZ1K, NOXINST

#use delay(clock=16Mhz, RESTART_WDT)

#use ...
  Topic: PIC18LF14K50 with compiler 4.120 bug ?
NePe

Replies: 5
Views: 7911

PostForum: General CCS C Discussion   Posted: Tue Jun 21, 2011 4:05 pm   Subject: PIC18LF14K50 with compiler 4.120 bug ?
Hi!
I want to set an interrupt to the RA5 pin but its not working.

I found in the .lst file that the enable_interrupts(INT_RA5) line is incorrect in ASM:
.................... enable_interrupts&# ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group