Author |
Message |
Topic: problem by interrupt timer and read external eeprom |
ck
Replies: 24
Views: 24957
|
Forum: General CCS C Discussion Posted: Tue Mar 26, 2013 10:40 am Subject: problem by interrupt timer and read external eeprom |
you need to reset TMR2IF adding
clear_interrupt(INT_TIMER2);
before exit form interrupt like here:
#int_timer2
void timer2_isr(void) {
if(++tick>=100& ... |
Topic: SPI Problem |
ck
Replies: 7
Views: 9268
|
Forum: General CCS C Discussion Posted: Thu Feb 21, 2013 3:25 am Subject: SPI Problem |
First, excuse me for my insistence.
I spend one day getting crazy trying to use spi. I know that all people that answer me also have work and have no time and interest to help me.
so i am really s ... |
Topic: SPI Problem |
ck
Replies: 7
Views: 9268
|
Forum: General CCS C Discussion Posted: Wed Feb 20, 2013 11:37 am Subject: SPI Problem |
Still
Main
output_low(CS_SLAVE);
spi_write(command);
log_data=spi_read(0);
output_high(CS_SLAVE);
and slave
if(spi_data_is_in()){
... |
Topic: SPI Problem |
ck
Replies: 7
Views: 9268
|
Forum: General CCS C Discussion Posted: Wed Feb 20, 2013 11:18 am Subject: SPI Problem |
Anybody can give a stupid simple spi communication code between 2 PIC.
Thanks in advantage |
Topic: SPI Problem |
ck
Replies: 7
Views: 9268
|
Forum: General CCS C Discussion Posted: Wed Feb 20, 2013 10:19 am Subject: SPI Problem |
Hi friends,
excuse me for disturb but i have spi communication problem between PIC18f4580 and PIC16f877A. I'm using ccs 4.134
Master Setting:
setup_spi(SPI_MASTER|SPI_L_TO_H|SPI_CLK_DIV_64& ... |
Topic: adc setup change SPI function in pic24 |
ck
Replies: 7
Views: 8718
|
Forum: General CCS C Discussion Posted: Mon Dec 03, 2012 11:20 am Subject: adc setup change SPI function in pic24 |
Hi Ttelmah,
thanks for reply. I have saw in simulation what setup_spi does in both compiler version. I have decided to configure SPI's register manually with this code:
SPI1CON1:0x013E;
SPI1C ... |
Topic: PIC24HJ256GP610 SPI DOESN'T WORK FOR 4.134 *** Locked - Dup |
ck
Replies: 0
Views: 3038
|
Forum: General CCS C Discussion Posted: Fri Nov 30, 2012 7:50 am Subject: PIC24HJ256GP610 SPI DOESN'T WORK FOR 4.134 *** Locked - Dup |
++++++++++++++++++++++++
Locked.
Reason: Duplicate topic. No new thread on same SPI topic !
Add new code to your PIC24 SPI thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=49508
- F ... |
Topic: adc setup change SPI function in pic24 |
ck
Replies: 7
Views: 8718
|
Forum: General CCS C Discussion Posted: Fri Nov 30, 2012 7:13 am Subject: adc setup change SPI function in pic24 |
How can is possible that with one versione of Compiler SPI works, Timers not at all, with other SPI doesn't send DATA, but timers work good. How many bugs there are in PCD??
How can a user pay for lo ... |
Topic: adc setup change SPI function in pic24 |
ck
Replies: 7
Views: 8718
|
Forum: General CCS C Discussion Posted: Fri Nov 30, 2012 2:34 am Subject: adc setup change SPI function in pic24 |
Hi dyeatman,
Thanks for reply. I'm using PIC24HJ256GP610.
Here are my fuses:
#DEVICE ADC=12
#fuses NOWDT //No Watch Dog Timer
#fuses NOWRTB //Boot block not write protected
#fuses NOBSS // ... |
Topic: adc setup change SPI function in pic24 |
ck
Replies: 7
Views: 8718
|
Forum: General CCS C Discussion Posted: Thu Nov 29, 2012 10:31 am Subject: adc setup change SPI function in pic24 |
Hi,
I have found no sense in ADC setup. In same configuration it blocks SPI communication.
Some idea?
Thanks |
Topic: read write program memory PIC24 |
ck
Replies: 1
Views: 9200
|
Forum: General CCS C Discussion Posted: Mon Sep 24, 2012 3:36 am Subject: read write program memory PIC24 |
Firstly thanks for all answers.
I understood how flash works and here is the solution.
#define CK_FLASH_END (getenv("PROGRAM_MEMORY")-1)
#define CK_FLASH_PAG ... |
Topic: PWM PIC24 Calculations - help needed |
ck
Replies: 5
Views: 10030
|
Forum: General CCS C Discussion Posted: Fri Sep 21, 2012 9:37 am Subject: PWM PIC24 Calculations - help needed |
Hi,
I have pic24hj and i have setup my PWM in this way:
I have 10MHz External Cristal with PLL enabled so fcycle=40MHz
so Tcycle=25nsec
setup_timer2(TMR_INTERNAL|TMR_DIV_BY_1,40000);
... |
Topic: read write program memory PIC24 |
ck
Replies: 1
Views: 9200
|
Forum: General CCS C Discussion Posted: Fri Sep 21, 2012 7:14 am Subject: read write program memory PIC24 |
Hi everybody,
I feel so stupid because i can't write and read a simple variable in my PIC24HJ.
I notice that no EEPROM figure out but i can write in a flash memory.
#define ROMCALOC 0x4000
#o ... |
Topic: PIC24 IVT Remap [solved] |
ck
Replies: 2
Views: 5605
|
Forum: General CCS C Discussion Posted: Wed May 09, 2012 3:54 am Subject: PIC24 IVT Remap [solved] |
I understand my error. Now it works. |
Topic: PIC24 IVT Remap [solved] |
ck
Replies: 2
Views: 5605
|
Forum: General CCS C Discussion Posted: Wed May 09, 2012 3:03 am Subject: PIC24 IVT Remap [solved] |
Update:
I have try the TIMER1 interrupt in bootloader with same principe.
At location 0x001A i put goto 0x0022C
and in 0x0022C i put my #int_timer1 routine.
Still doen't work. In Simulation i ... |
|