Problem reading port H

Started by mithrandir017 in 68HC1212 years ago

I have a M68KIT912DP256 evaluation board for the MC9S12DP256 microcontroller. On the evaluation board there is a set of switches that I would...

I have a M68KIT912DP256 evaluation board for the MC9S12DP256 microcontroller. On the evaluation board there is a set of switches that I would like to read and send to port B (which is connected to a set of LED's). When viewing the memory using CodeWarrior, the value of the PTIH register contains the value I expect, and everything goes as desired. As soon as I now write a value to port B (thi


need help please

Started by sladezm in 68HC1212 years ago 1 reply

hi im using a CML12S-DP256 MC9s12DP256 im trying to detect if theres voltage going though port b though pb01 heres my code #include ...

hi im using a CML12S-DP256 MC9s12DP256 im trying to detect if theres voltage going though port b though pb01 heres my code #include #include void main() { DDRB=0x00; if((PORTB&0x02)){ /* tests bit 2 if voltage is detected on port b*/ puts("detected");} else{ printf("nodetect"); } } im i initilizing it right? for some reason when i run it with


DP256: Problem with receiving

Started by rithes ameen in 68HC1213 years ago 7 replies

Hi there , I am having a problem regarding reception of the data . Identifier used is 00 for the controller Mc9s12dp256 I have...

Hi there , I am having a problem regarding reception of the data . Identifier used is 00 for the controller Mc9s12dp256 I have set my Acceptance register to CAN0IAR[0-7]=00; CAN0IMR[0-7]=0x0FF; and CAN0IAC=0x20; // That is 16 bit wide register The controller is getting Synchroised that is "synch" bit is one.


LRAE linking with CodeWarrior

Started by apedroso11 in 68HC1212 years ago 2 replies

I am using LRAE (AN2546SW) with CodeWarrior3.1 but I have problems linking I have created a new project from the Stationary for...

I am using LRAE (AN2546SW) with CodeWarrior3.1 but I have problems linking I have created a new project from the Stationary for MC9S12DP256 (flash target) I have substituted the called to _Startup routine in the PRM file to the called to main routine of the AN2546SW in order to use its initialization instead of the one on the START12.c from


Dragon 12 potentiometer

Started by mkarthik_reddy in 68HC1211 years ago

Hi all, I have a problem when trying to read the analog value from the onboard potentiometer on Dragon 12(mc9s12dp256).I came to know that the...

Hi all, I have a problem when trying to read the analog value from the onboard potentiometer on Dragon 12(mc9s12dp256).I came to know that the potentiometer is internally connected to pad07 and the result is stored in the adr00h register.I tried to display it on the LCD.It gives a blank space.These are my ATDCTL config words _io_reg[atd0ctl2]=0x80; _io_reg[atd0ctl3]=0x08; _io_reg[atd0ctl...


Potentiometer dragon 12?

Started by mkarthik_reddy in 68HC1211 years ago

Hi all, I have a problem when trying to read the analog value from the onboard potentiometer on Dragon 12(mc9s12dp256) .I came to know that the...

Hi all, I have a problem when trying to read the analog value from the onboard potentiometer on Dragon 12(mc9s12dp256) .I came to know that the potentiometer is internally connected to pad07 and the result is stored in the adr00h register.I tried to display it on the LCD.It gives a blank space.These are my ATDCTL config words _io_reg[atd0ctl2] =0x80; _io_reg[atd0ctl3] =0x08; _io_reg[atd0...


Noral Debugger newbie

Started by Louis Yan in 68HC1215 years ago 3 replies

Hi, After a decade of Microchip and 8051 microcontrollers, I am migrating to Motorola MC9s12DP256. Using the Noral 68HC12 Flex...

Hi, After a decade of Microchip and 8051 microcontrollers, I am migrating to Motorola MC9s12DP256. Using the Noral 68HC12 Flex debugger, I am able to load a simple s19 file into Ram, but am not able to load similar file into Flash. Can anyone put me in the right direction?


E2Prom system

Started by Anonymous in 68HC1214 years ago 4 replies

Hello ! I work with mc9s12dp256. I'm looking about the 4k E2Prom system, data sheet EETS4K. I don't understand what...

Hello ! I work with mc9s12dp256. I'm looking about the 4k E2Prom system, data sheet EETS4K. I don't understand what clock, what frequency, is used for Eeprom system : - Quartz oscillator ? - Quartz oscillator / 2 ? - PLL ? My quartz is 12


Using IAR Compiler for MC9s12DP256

Started by mohan kumar in 68HC1215 years ago 2 replies

Hi, Is there any way to avoid having Interrupt Vector Table information in the output file generated using IAR workbench.? ...

Hi, Is there any way to avoid having Interrupt Vector Table information in the output file generated using IAR workbench.? I tried to delete the INTVEC segment in the linker file but, the linker always looks for this segment and generates a error. Is there any way to over ri


erasing 256k flash memory with mc9s12dp256

Started by Micro m6net in 68HC1216 years ago 5 replies

Hi, With a self programmed bootloader which runs in Ram, we have some trouble to erase memory flash block with mass_erase...

Hi, With a self programmed bootloader which runs in Ram, we have some trouble to erase memory flash block with mass_erase command. But if we send two times the function, we have a correct erasing. Therefore, same function but in writing mode works properly after erasi


Generate TTL with Output Compare

Started by Chaitanya Ausuri in 68HC1215 years ago 1 reply

Hi all, I am just a beginner at Microcontroller program. I need to generate a periodic signal with around 8Khz freq and duty cycle...

Hi all, I am just a beginner at Microcontroller program. I need to generate a periodic signal with around 8Khz freq and duty cycle of 60% at output of Timer channel 2 in an infinite loop. This should be done by using output compare function of MC9S12DP256 Microcontroller. The output should come out at


XGate programming and XDP512 memory scheme

Started by jpdi in 68HC1210 years ago 2 replies

Hello ! Until now, I was using mc9s12dp256 with ICC12 V6 professionnal, paged programm, and all was ok. Now, using mc9s12xdp512cal, with...

Hello ! Until now, I was using mc9s12dp256 with ICC12 V6 professionnal, paged programm, and all was ok. Now, using mc9s12xdp512cal, with ICC12 professionnal V6, I need to use XGate processor (communication SCI between 2 MCU). Without XGate, the main S12 CPU would be overload ! I read the Freescale datasheets, specially the chapters about : - XGate, - Memory Mapping Control - Interru...


I2C delay after each ACK on MC9S12DP256

Started by Chengrong Lu in 68HC1215 years ago 1 reply

My module is working as a slave receiver, my I2C ISR can be simplified as follows: void interrupt I2CISR(void) { IBIF = 1;...

My module is working as a slave receiver, my I2C ISR can be simplified as follows: void interrupt I2CISR(void) { IBIF = 1; bThisByte = IBDR; } After the last statement, the receiver sends out an ACK, and after this ACK, the MCU holds both SDA a


MC9S12DP256 Serial Communication Issue

Started by b_herson in 68HC1213 years ago 2 replies

I am attempting to attain GPS NMEA data over the 9pin serial that is mapped to SCI0. The board has MON12 monitor code that also...

I am attempting to attain GPS NMEA data over the 9pin serial that is mapped to SCI0. The board has MON12 monitor code that also uses SCI0. From my PC I am able to, at different baud rates, freely send and receive ASCII data too HyperTerminal and AX-IDE through the 9pin


Metrowerks SmartLinker doesn't include Banked Flash code in S-Record generation

Started by phylacjoe in 68HC1215 years ago 1 reply

I've recently been studying M.Doughman's AN2153: Serial Bootloader for MC9S12DP256. It is stated that S-records generated by Cosmic...

I've recently been studying M.Doughman's AN2153: Serial Bootloader for MC9S12DP256. It is stated that S-records generated by Cosmic software works fine, but I'm on Metrowerks CodeWarrior, so... I had no problems installing the bootloader into the Protected High area (Starti


Re: Experience with J1850 and ISO9141

Started by Jean-Sebastien Bouchard in 68HC1212 years ago 1 reply

Both the MC9S12DP256 and the 68HC58 datasheets talk about the output to the J1850-VPW bus. What about the J1850PWM bus. My guess is that it...

Both the MC9S12DP256 and the 68HC58 datasheets talk about the output to the J1850-VPW bus. What about the J1850PWM bus. My guess is that it is just a matter of physical interface between the selected controller and the bus, right? Also, very little information may be found about the actual physical interface that is recommended to the J1850PWM bus. The SAE spec itself only discuss the tim...


MC9S12DG256 ATD pins as dig inputs

Started by Jeff McKnight in 68HC1214 years ago 1 reply

Hello, Can someone tell me how to read the status of PORTAD0 pins as digital inputs ? I see the ATDDIEN register and the PORTAD1...

Hello, Can someone tell me how to read the status of PORTAD0 pins as digital inputs ? I see the ATDDIEN register and the PORTAD1 data register but I can find no reference as to how to read PORTAD0 as digital inputs. I am reading MC9S12DP256 Advance Info rev 1.1 Thanks


Looking for reference design - HCS12 with external flash - expanded wide mode

Started by xeorok in 68HC1215 years ago 4 replies

Before I commit to a PCB I am looking for a couple of reference designs that work to check my design against !!!! I am using an ...

Before I commit to a PCB I am looking for a couple of reference designs that work to check my design against !!!! I am using an MC9S12DP256 microcontroller with an AM29F800B (512k byte X 16 bit wide) flash memory chip for external program memory. I want to be able to use the P&am


Problem compiling HC12 code to flash onto Wytec Minidragon

Started by thomasfong in 68HC1212 years ago 2 replies

Hello, I have a Wytec MC9S12DP256 MiniDragon Development board. I have written a simple program that uses the RTI interrupt to update...

Hello, I have a Wytec MC9S12DP256 MiniDragon Development board. I have written a simple program that uses the RTI interrupt to update the status of PORTM and the rest of the program waits and sends messages via the serial port (SCI0) to the computer and toggles the ports as necessary.=20=20 The code is fully debugged and works perfectly when using the board in EVB mode with the DBug12 ...


dbug12 with MC9S12dp256 or MC9S12DP512

Started by athery in 68HC1212 years ago

Somebody can help me to compile in gnu compiler the file dbug12.h (problem with __attribute((far))__ ) i use the option -mcall but when i...

Somebody can help me to compile in gnu compiler the file dbug12.h (problem with __attribute((far))__ ) i use the option -mcall but when i look the file.lst the adress of printf is $EE86 instead of $EE88 thanks for your help (projet with hello world, dbug12 , gnu and mc9s12dpxxx) dbug12.h : typedef char * Address; typedef int Boolean; typedef unsigned char Byte; typedef struct {