Legacy microcontrollers Forum Discussions
Sort by:
Legacy microcontrollers
I have the strangest of occurrences. I'm entering ISR14 (NMI) with NMISR.FNMIECC = 1, even though NMICON.NMIECC = 0.I have no clue, yet, what triggers...
Show More
I have the strangest of occurrences. I'm entering ISR14 (NMI) with NMISR.FNMIECC = 1, even though NMICON.NMIECC = 0.
I have no clue, yet, what triggers it, but I don't think that should happen.
It seems to be connected to the flash timer and read access to the D-Flash. Show Less
I have no clue, yet, what triggers it, but I don't think that should happen.
It seems to be connected to the flash timer and read access to the D-Flash. Show Less
Legacy microcontrollers
Hello,I've developed a new board using SAF XC886 and I'm trying to flash it over CAN, BSL mode. (PC->USB->EvaBoard->CAN BSL->new developed board SAF x...
Show More
Hello,
I've developed a new board using SAF XC886 and I'm trying to flash it over CAN, BSL mode.
(PC->USB->EvaBoard->CAN BSL->new developed board SAF xc886, with ATMEL CAN transceiver)
The pinning is at follows:
MBC=0v
TMS=0v
RESET=5v
The new developed board seems to enter Reset Mode, (Watchdog TImer?), the current consumption drops to minimum.
The supply is made through a general 5V. and remains stable to 5V and 2.5V core supply.
Does anybody have any clue why?
Thanks in advance. Show Less
I've developed a new board using SAF XC886 and I'm trying to flash it over CAN, BSL mode.
(PC->USB->EvaBoard->CAN BSL->new developed board SAF xc886, with ATMEL CAN transceiver)
The pinning is at follows:
MBC=0v
TMS=0v
RESET=5v
The new developed board seems to enter Reset Mode, (Watchdog TImer?), the current consumption drops to minimum.
The supply is made through a general 5V. and remains stable to 5V and 2.5V core supply.
Does anybody have any clue why?
Thanks in advance. Show Less
Legacy microcontrollers
I am using M430F2618T as a slave and Cyclone II fpga as a master in SPI data transfer. just for the purpose of testing, I want to transfer a square wa...
Show More
I am using M430F2618T as a slave and Cyclone II fpga as a master in SPI data transfer. just for the purpose of testing, I want to transfer a square wave (MOSI signal) to microcontroller and get the same signal back as (MISO signal) at fpga. Here is the code for a microcontroller. Though I am able to get MOSI signal at microcontroller, I am not able to get MISO signal back at the fpga. Please suggest ay changes to be made in the microcontroller code.
#include
void main(void)
{
WDTCTL = WDTPW+WDTHOLD; // Stop watchdog timer
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
// // it is not yet in SPI mode
P3SEL |= 0x31; // P3.5,4,0 option select
UCA0CTL1 = UCSWRST; // **Put state machine in reset**
UCA0CTL0 |= UCSYNC+UCMSB; //3-pin, 8-bit SPI slave
UCA0CTL0 &= ~UCMST;
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
while (1)
{
while (!(IFG2 & UCA0TXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = UCA0RXBUF;
}
}
Show Less
#include
void main(void)
{
WDTCTL = WDTPW+WDTHOLD; // Stop watchdog timer
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
// // it is not yet in SPI mode
P3SEL |= 0x31; // P3.5,4,0 option select
UCA0CTL1 = UCSWRST; // **Put state machine in reset**
UCA0CTL0 |= UCSYNC+UCMSB; //3-pin, 8-bit SPI slave
UCA0CTL0 &= ~UCMST;
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
while (1)
{
while (!(IFG2 & UCA0TXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = UCA0RXBUF;
}
}
Legacy microcontrollers
Hi all.Ive got some problems with initialization my sd card. Ive been siting for a couples of days trying to do something and there is no results. Can...
Show More
Hi all.
Ive got some problems with initialization my sd card. Ive been siting for a couples of days trying to do something and there is no results. Can anyone help me whats wrong in my code:
char sdInit()
{
unsigned char i;
// 74 clocks z cs
P3_1 = 0x1; //cs high
for(i=0;i<10;i++) spiSendByte(0xFF);
P3_1 = 0x0;
return 1;
}
BYTE spiSendByte(BYTE dana)
{
SSC_TBL = dana; //send data by spi
while(SSC_CONH_O & 0x10); //wait when busy
return SSC_RBL; //read spi
}
//comand
BYTE sd_cmd(BYTE cmd, DWORD arg)
{
BYTE result, retry=0;
spiSendByte(cmd | 0x40);
spiSendByte((BYTE)(arg >> 24));
spiSendByte((BYTE)(arg >> 16));
spiSendByte((BYTE)(arg >> 8));
spiSendByte((BYTE)(arg >> 0));
if(cmd==CMD_GO_IDLE_STATE)
result = spiSendByte(0x95);
else
result = spiSendByte(0xff);
while(result == 0xff) {
if(++retry > 10) break; //lets give a chance to answer
result = spiSendByte(0xff);
}
spiSendByte(0xff); //adding some clks
return result;
}
BYTE sd_cmd_cs(BYTE cmd, DWORD arg)
{
BYTE result;
P3_1 = 0;
result = sd_cmd(cmd, arg);
P3_1 = 1;
return result;
}
When init spi baudrate = 40kb, after init 400kb. I am using Sandisk Ultra 15mb/s 8 gb card. I think my spi reading doesnt work well.... I am sending good frames, but the card keep giving the same answer 0xff. The schematic of the circuit is the same like sandisk`s documentation schematic.
Thank you for any help. Show Less
Ive got some problems with initialization my sd card. Ive been siting for a couples of days trying to do something and there is no results. Can anyone help me whats wrong in my code:
char sdInit()
{
unsigned char i;
// 74 clocks z cs
P3_1 = 0x1; //cs high
for(i=0;i<10;i++) spiSendByte(0xFF);
P3_1 = 0x0;
return 1;
}
BYTE spiSendByte(BYTE dana)
{
SSC_TBL = dana; //send data by spi
while(SSC_CONH_O & 0x10); //wait when busy
return SSC_RBL; //read spi
}
//comand
BYTE sd_cmd(BYTE cmd, DWORD arg)
{
BYTE result, retry=0;
spiSendByte(cmd | 0x40);
spiSendByte((BYTE)(arg >> 24));
spiSendByte((BYTE)(arg >> 16));
spiSendByte((BYTE)(arg >> 8));
spiSendByte((BYTE)(arg >> 0));
if(cmd==CMD_GO_IDLE_STATE)
result = spiSendByte(0x95);
else
result = spiSendByte(0xff);
while(result == 0xff) {
if(++retry > 10) break; //lets give a chance to answer
result = spiSendByte(0xff);
}
spiSendByte(0xff); //adding some clks
return result;
}
BYTE sd_cmd_cs(BYTE cmd, DWORD arg)
{
BYTE result;
P3_1 = 0;
result = sd_cmd(cmd, arg);
P3_1 = 1;
return result;
}
When init spi baudrate = 40kb, after init 400kb. I am using Sandisk Ultra 15mb/s 8 gb card. I think my spi reading doesnt work well.... I am sending good frames, but the card keep giving the same answer 0xff. The schematic of the circuit is the same like sandisk`s documentation schematic.
Thank you for any help. Show Less
Legacy microcontrollers
I have made an elevator project, i am using mikro C and PIC16F877A.http://www.misr-news.com/test.txtNB : up and down variables are for the motor to sp...
Show More
I have made an elevator project, i am using mikro C and PIC16F877A.
http://www.misr-news.com/test.txt
NB : up and down variables are for the motor to spin in both directions
The project works great on protues but when i wrote it on the PIC and tested on a test board, the LCD and the motor worked fine but the 4 LEDs (led_0,led_1,led_2,led_3) sometimes work, sometimes flashes and sometimes don't even illuminate light !
But when i removed all the LCD commands the LEDs worked great!!
So i only can make one of them work at a time ! Show Less
http://www.misr-news.com/test.txt
NB : up and down variables are for the motor to spin in both directions
The project works great on protues but when i wrote it on the PIC and tested on a test board, the LCD and the motor worked fine but the 4 LEDs (led_0,led_1,led_2,led_3) sometimes work, sometimes flashes and sometimes don't even illuminate light !
But when i removed all the LCD commands the LEDs worked great!!
So i only can make one of them work at a time ! Show Less
Legacy microcontrollers
XC878 UM 1.1 states in section 4.4:[quote="XC878 UM 1.1"]The Flash Timer has 2 operating modes, Program Timer and Erase Timer modes, whichare selectab...
Show More
XC878 UM 1.1 states in section 4.4:
[quote="XC878 UM 1.1"]The Flash Timer has 2 operating modes, Program Timer and Erase Timer modes, which
are selectable using the bit FTVAL.MODE. In Program Timer mode (FTVAL.MODE=0),
a 7-bit counter is used to count up to the designated overflow value stored in
FTVAL.OFVAL. Once this value is reached, the associated overflow flag FCS.FTOV is
set.
But section 4.9 (Register Description) doesn't know about a bit named FTOV. I'd guess it's FCS.4. It also could be FCS.7. Is there an official answer? Show Less
[quote="XC878 UM 1.1"]The Flash Timer has 2 operating modes, Program Timer and Erase Timer modes, which
are selectable using the bit FTVAL.MODE. In Program Timer mode (FTVAL.MODE=0),
a 7-bit counter is used to count up to the designated overflow value stored in
FTVAL.OFVAL. Once this value is reached, the associated overflow flag FCS.FTOV is
set.
But section 4.9 (Register Description) doesn't know about a bit named FTOV. I'd guess it's FCS.4. It also could be FCS.7. Is there an official answer? Show Less
Legacy microcontrollers
Has anyone compared software execution time between XC16x and XC2000 with same system clock?
If yes, how was your result?
If yes, how was your result?
Legacy microcontrollers
I'm using the D-Flash on the XC878-16FF with 64k Flash. There I have to switch to code bank 2 (MEX1=2) to run functions from XRAM or the Boot ROM.Beca...
Show More
I'm using the D-Flash on the XC878-16FF with 64k Flash. There I have to switch to code bank 2 (MEX1=2) to run functions from XRAM or the Boot ROM.
Because the XC878-13FF only has 52k of flash the Boot ROM and XRAM can be blended into the 16bit code space and no banking is required there. I'd like to write compatible code, my question is, what happens on the 13FF if I set MEX1=2. Does the register even exist there, is it ignored?
I'd prefer to spare myself a lot of ifdefs and just leave the bank switching stuff in the code, so I hope the register is a) safe to write to and b) doesn't have any effect on the 13FF.
Figure 3-2 in the XC878 UM indicates (to my understanding) that the 13-FF doesn't have banking. But I find no clarification of this. Maybe I looked in the wrong places. Show Less
Because the XC878-13FF only has 52k of flash the Boot ROM and XRAM can be blended into the 16bit code space and no banking is required there. I'd like to write compatible code, my question is, what happens on the 13FF if I set MEX1=2. Does the register even exist there, is it ignored?
I'd prefer to spare myself a lot of ifdefs and just leave the bank switching stuff in the code, so I hope the register is a) safe to write to and b) doesn't have any effect on the 13FF.
Figure 3-2 in the XC878 UM indicates (to my understanding) that the 13-FF doesn't have banking. But I find no clarification of this. Maybe I looked in the wrong places. Show Less
Legacy microcontrollers
Hello,I want to interface XC164 with incremental encoder.I red datasheet.It is possible by GPT1.The port of GPT1 is also JTAG/OCDS.How can I use the G...
Show More
Hello,
I want to interface XC164 with incremental encoder.
I red datasheet.
It is possible by GPT1.
The port of GPT1 is also JTAG/OCDS.
How can I use the GPT1 and JTAG? Show Less
I want to interface XC164 with incremental encoder.
I red datasheet.
It is possible by GPT1.
The port of GPT1 is also JTAG/OCDS.
How can I use the GPT1 and JTAG? Show Less
Legacy microcontrollers
Hello all,For the XC836 devices the default BMI (Boot Mode Index) is "UART BSL Mode". So BMI = 0x00.But when the chip is factory mounted on top of an ...
Show More
Hello all,
For the XC836 devices the default BMI (Boot Mode Index) is "UART BSL Mode". So BMI = 0x00.
But when the chip is factory mounted on top of an KIT_XC836_EK (Easy Kit), then an "Alarm Clock" example application is pre-programmed in order to have a nice out-of-the-box experience.
I guess that in such pre-programmed Easy Kit chip also the BMI is pre-programmed.
Can anybody disclose what BMI and/or USER-ID values are pre-programmed by Infineon in the XC836 on the KIT_XC836_EK ???
Looking forward to the reply.
Best regards from the chilly Netherlands, Johan. Show Less
For the XC836 devices the default BMI (Boot Mode Index) is "UART BSL Mode". So BMI = 0x00.
But when the chip is factory mounted on top of an KIT_XC836_EK (Easy Kit), then an "Alarm Clock" example application is pre-programmed in order to have a nice out-of-the-box experience.
I guess that in such pre-programmed Easy Kit chip also the BMI is pre-programmed.
Can anybody disclose what BMI and/or USER-ID values are pre-programmed by Infineon in the XC836 on the KIT_XC836_EK ???
Looking forward to the reply.
Best regards from the chilly Netherlands, Johan. Show Less