weird things with SPI on DG128

Started by Steve Letkeman in 68HC1214 years ago 6 replies

I've taken some perfectly good SPI code from a BC32 program and am getting some very weird results with the DG128. In some cases...

I've taken some perfectly good SPI code from a BC32 program and am getting some very weird results with the DG128. In some cases it appears that the status register shows the transfer is complete before it actually is. I also don't get consistant results when reading back data. I've


HC12 interface to SD card

Started by macd...@... in 68HC1213 years ago 7 replies

I am trying to make a little data logger that writes data to an SD card. I am using the MC68HC912B32 processor, this has an ADG3257 on the SPI...

I am trying to make a little data logger that writes data to an SD card. I am using the MC68HC912B32 processor, this has an ADG3257 on the SPI lines to convert the 5V of the micro to 3.3V for the SD card. I can bring the card up in SPI mode and issue a read block, the problem is that I only get the first four bytes of the block then the card sends 0x3F and no more data. I was wondering if an...


spi hangging up

Started by joe_nasignal in 68HC1214 years ago 1 reply

hi all, new to the hc12, long time user of hc11 family. device: mc9s12a256 when using the spi to send a string of bytes the...

hi all, new to the hc12, long time user of hc11 family. device: mc9s12a256 when using the spi to send a string of bytes the first time works ok, when sending second string i fail to get the tx ready bit set. works ok in single step, not at full speed. brief flow: init


Pb interrupt on timer

Started by Anonymous in 68HC1213 years ago 5 replies

Hello I use 9s12dp256, ICC12 pro compiler, NoIce debugger. In order to mask the errata on SPI (mask 1K79X) when CPHA bit set, which ...

Hello I use 9s12dp256, ICC12 pro compiler, NoIce debugger. In order to mask the errata on SPI (mask 1K79X) when CPHA bit set, which cause problem on SPTEF flag (MUCts00702 : SPI SPTEF flag set erroneously), I first write interrupt routine like this : //********************************************** #pragma interrupt_handler Spi0_isr


Connect LCD via SPI

Started by stephan_bauer01 in 68HC1211 years ago

Hello, I'm a beginner an I need some help with connecting a LCD via SPI. Sorry for my english. I want to reprogram a existing board and I...

Hello, I'm a beginner an I need some help with connecting a LCD via SPI. Sorry for my english. I want to reprogram a existing board and I can't show data on the display till now. At start up the display shows some random data an I can switch the display on and off. The oscillator runs at 4MHz. I'm using a 9S12DJ64 and a LCD called PT6574. This is what I programmed till now: http://fo...


MC33989

Started by dwarkanath avarur in 68HC1213 years ago 5 replies

Hello I'm using MC33989. My intention is to refresh the watchdog reset of MC33989. From Micro (MC9S12DG128B) I'm sending SPI...

Hello I'm using MC33989. My intention is to refresh the watchdog reset of MC33989. From Micro (MC9S12DG128B) I'm sending SPI command to the MC33989 to refresh the watchdog, but I'm getting every 350ms reset on the MC33989. My SPI settings at Micro are as f


Multiple SPI device conflict

Started by Patrick Neary in 68HC1212 years ago 4 replies

Hello, I've got several devices communicating on my SPI bus. I've got an analog to digital converter and a system basis chip (provides...

Hello, I've got several devices communicating on my SPI bus. I've got an analog to digital converter and a system basis chip (provides power control for my board). The system basis chip requires a watchdog timer message every 120 milliseconds. I'm doing long sets of data acquisition, so I send the watchdog timer out of an output comare timer int


MAX3140 SPI UART Driver

Started by Killingsworth, Steve in 68HC1214 years ago 1 reply

Does anyone have an interrupt based driver for the MAX3140 SPI UART that will run on an DG128A? Stephen Killingsworth ...

Does anyone have an interrupt based driver for the MAX3140 SPI UART that will run on an DG128A? Stephen Killingsworth Senior Software / Electrical Engineer Perry Slingsby Systems Inc. http://www.perryslingsbysystems.co


EEPROM based file system via SPI

Started by Mark Butcher in 68HC1212 years ago

Hi All I have just published a tutorial showing how to add an EEPROM to the SPI of the HCS12 (with diagrams and photos of the adapter for...

Hi All I have just published a tutorial showing how to add an EEPROM to the SPI of the HCS12 (with diagrams and photos of the adapter for typical EVB and DEMO boards) for use as an external file system - it is specifically for the NE64 to increase the program code space to 64k while still allowing web pages (up to 64k) to be served from simple and cheap external memory. http://www....


Read write flash - Eprom SPI

Started by macflight2005 in 68HC1213 years ago 2 replies

I would like to transfer a part of the flash to a serial Eprom and transfer datas in Eprom to the flash. I actually can...

I would like to transfer a part of the flash to a serial Eprom and transfer datas in Eprom to the flash. I actually can read and write in my Eprom via SPI. I found apllication notes to erase and write the flash(I m working on this). BUT I can't find an example t


pb with mmc et sandisk

Started by Pascal in 68HC1213 years ago

Hello, I use for my application MMC card in spi mode with hcs12. I have problem with sandisk card. It is very slow to write a single block...

Hello, I use for my application MMC card in spi mode with hcs12. I have problem with sandisk card. It is very slow to write a single block and i lose data. With other models i have no problem. Is someone have this kind of problem? Here is my code to write a block. Regards //Initialisatin du mode SPI en maitre void InitSPI


sample codes on ATD,SCI, SPI, TIMER MODULE

Started by Mallikarjun Reddy in 68HC1210 years ago

Hi, Can I know where I can get the detail information on the basic steps to write program for the interrupt in C? Any sample code as a...

Hi, Can I know where I can get the detail information on the basic steps to write program for the interrupt in C? Any sample code as a reference? Basically, I will use SCI, SPI, Timer module, ATD,in my project . Any reference or sample code on this? What are the specific registers that needed .To be initialised and also corresponding ports bits . Any help is highly appreciated. Best R...


Re: code for ia4420

Started by ratk...@gmail.com in 68HC1211 years ago

Hy, I'm newbie here and some weeks ago I had the same problem with IA4420. The problem was with the nSEL, because I use an AT MEGA8 and it...

Hy, I'm newbie here and some weeks ago I had the same problem with IA4420. The problem was with the nSEL, because I use an AT MEGA8 and it has a 8 bit SPI and the IA4420 uses 16bit, and I switched the nSEL to high after 8 bit but it need to switch to high after 16bit, and the nSEL high state initializes the execution of the command. You can check SPI bus functionally with Power Management ...


questions about SPI of c32

Started by raifystein81 in 68HC1212 years ago 5 replies

I find an strange question of c32's spi. unsigned char xferSPI0(unsigned char abyte){ SPIDR = abyte; // start transfer while((SPISR &&...

I find an strange question of c32's spi. unsigned char xferSPI0(unsigned char abyte){ SPIDR = abyte; // start transfer while((SPISR && 0x80) == 0) ; // wait until transfer finished return(SPIDR); // read back data received } when I use these codes to transfer a byte,the sclk will go never have a break... only use these cod


ia4420 problem

Started by in 68HC1211 years ago

Hy, I'm newbie here and some weeks ago I had the same problem with IA4420. The problem was with the nSEL, because I use an AT MEGA8 and it has...

Hy, I'm newbie here and some weeks ago I had the same problem with IA4420. The problem was with the nSEL, because I use an AT MEGA8 and it has a 8 bit SPI and the IA4420 uses 16bit, and I switched the nSEL to high after 8 bit but it need to switch to high after 16bit, and the nSEL high state initializes the execution of the command. You can check SPI bus functionally with Power Managemen...


SD Card

Started by in 68HC1211 years ago 13 replies

Hello, I am Trying to do a SD card system with HC9S12E128 using the SPI interfase. Do anybody have ideas??

Hello, I am Trying to do a SD card system with HC9S12E128 using the SPI interfase. Do anybody have ideas??


Bootloading

Started by Graham Tricker in 68HC1214 years ago

Hi all I currently have a system using two MC9S12DP256 connected via an spi interface. I have a requirement to be able to...

Hi all I currently have a system using two MC9S12DP256 connected via an spi interface. I have a requirement to be able to bootload both processors via 1 serial port. We already use the Motorola D-Bug12 bootloader successfully in other applications. We have decide


wifi on hc12

Started by timjenison in 68HC1212 years ago 4 replies

Anyone ever tried to run an SDIO WIFI card on the SPI interface of on HC12?

Anyone ever tried to run an SDIO WIFI card on the SPI interface of on HC12?


SPI and Max3100

Started by rlewis51 in 68HC1213 years ago

To the folks that offered help to my problem(s) with this setup - Thanks ! Got the issues resolved. Seems that the...

To the folks that offered help to my problem(s) with this setup - Thanks ! Got the issues resolved. Seems that the MAX3100 likes to see the CS- line go low right before the Sclk starts working. I had several instructions between the CS- assertion and the first


Re: using the SCI with my transceiver

Started by gogosgeorge in 68HC1213 years ago 6 replies

Guys, just to let you know, the reason why I was asking questions before about the SCI, and how everyone was telling me to...

Guys, just to let you know, the reason why I was asking questions before about the SCI, and how everyone was telling me to read the manual, On the cd, there was no section on the SCI, just the SPI!!! Thats why I was getting confused. I looked at freescale, and found