EmbeddedRelated.com
Forums

HCS12 microcontroller question

Started by panfilero February 9, 2007
Vladimir Vassilevsky wrote:
> > > Tim Wescott wrote: > >> panfilero wrote: >> >>> I'm pretty new to microcontrollers, how do I short the serial and get >>> it to echo? > > Another embedded engineer needs his diapers changed...
Give the guy a break. I use my breakout box, but I'll wager he doesn't have one. Did he say he was an engineer? He's trying to get started. That you and I did that before we got to high school may confer bragging rights, but not sneering rights. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Jerry Avins wrote:
> Tim Wescott wrote: > >> panfilero wrote: >> >>> I'm pretty new to microcontrollers, how do I short the serial and get >>> it to echo? The development board I got is the: CME-12NE64-DEV >>> here's a link to it: http://www.axman.com/?q=node/257 >>> it has 2 serial ports, i thought i would connect them both to them >>> computer in order to communicate with my chip through the >>> hyperterminal..... I got some code from this guy's web site: http:// >>> users.ece.utexas.edu/~valvano/index.html >>> and tried to modify it a bit to work with my MCU, and I get it to >>> compile and run... but can't get anything to happen on the >>> hyperterminal..... I'm wondering if I have to fonfigure the other >>> serial port somehow, maybe it's not outputting.... If I set serial >>> port 1 on codewarrior to load my MCU with the program, I was thinking >>> I could plug the other serial port into com 2 on my computer and have >>> hyperterminal set up on com 2, to recieve and transfer data.... I >>> don't know if I'm thinking about this correctly. >>> >>> thanks >>> Joshua >>> >> Pins 2 and 3 are the transmit and receive pins. If you short them >> together, and the cable is working, then the computer will be talking >> to itself. >> >> It's a good test to make sure that everything up to the board is in >> working order -- if there's something wrong on the host side any work >> you do on the target board side is wasted effort. > > > You short the same two pins on the terminal side to make it loop back. > If both board and terminal work separately but they don't work together, > first make sure the baud rates are the same, then that the "common" > ground is really common. > > Jerry
I remember a case where the "common" ground had a 50V difference between conductors. We discovered this _after_ we found the burnt place where the serial port card's ground trace used to be. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html

Jerry Avins wrote:

>> Another embedded engineer needs his diapers changed... > Give the guy a break.
OK. Here is something to have fun: http://religiousfreaks.com/2007/01/31/avoid-herouxville-quebec-if-youre-muslim/ Comments appreciated. VLV
On Sat, 10 Feb 2007 17:33:55 -0800, the renowned Tim Wescott
<tim@seemywebsite.com> wrote:

>Jerry Avins wrote: >> Tim Wescott wrote: >> >>> panfilero wrote: >>> >>>> I'm pretty new to microcontrollers, how do I short the serial and get >>>> it to echo? The development board I got is the: CME-12NE64-DEV >>>> here's a link to it: http://www.axman.com/?q=node/257 >>>> it has 2 serial ports, i thought i would connect them both to them >>>> computer in order to communicate with my chip through the >>>> hyperterminal..... I got some code from this guy's web site: http:// >>>> users.ece.utexas.edu/~valvano/index.html >>>> and tried to modify it a bit to work with my MCU, and I get it to >>>> compile and run... but can't get anything to happen on the >>>> hyperterminal..... I'm wondering if I have to fonfigure the other >>>> serial port somehow, maybe it's not outputting.... If I set serial >>>> port 1 on codewarrior to load my MCU with the program, I was thinking >>>> I could plug the other serial port into com 2 on my computer and have >>>> hyperterminal set up on com 2, to recieve and transfer data.... I >>>> don't know if I'm thinking about this correctly. >>>> >>>> thanks >>>> Joshua >>>> >>> Pins 2 and 3 are the transmit and receive pins. If you short them >>> together, and the cable is working, then the computer will be talking >>> to itself. >>> >>> It's a good test to make sure that everything up to the board is in >>> working order -- if there's something wrong on the host side any work >>> you do on the target board side is wasted effort. >> >> >> You short the same two pins on the terminal side to make it loop back. >> If both board and terminal work separately but they don't work together, >> first make sure the baud rates are the same, then that the "common" >> ground is really common. >> >> Jerry > >I remember a case where the "common" ground had a 50V difference between >conductors. We discovered this _after_ we found the burnt place where >the serial port card's ground trace used to be.
LOL. I remember the time we discovered the dufus^H^H^H^H customer had swapped the ground and hot wires in the line cord. Surprisingly, the test PC serial port survived. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Vladimir Vassilevsky wrote:
> > > Jerry Avins wrote: > >>> Another embedded engineer needs his diapers changed... >> Give the guy a break. > > OK. Here is something to have fun: > > http://religiousfreaks.com/2007/01/31/avoid-herouxville-quebec-if-youre-muslim/ > > > Comments appreciated.
I agree with most of the expressed sentiments of public decorum (Christmas trees excepted) but not with their publication. I don't think that these forums are appropriate for expressing why I hold those views. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Spehro Pefhany wrote:

> LOL. I remember the time we discovered the dufus^H^H^H^H customer had > swapped the ground and hot wires in the line cord. Surprisingly, the > test PC serial port survived.
I'm glad the dufus^H^H^H^H customer survived. I remember when one phase of the 220V line got connected to the 5V bus on a small mainframe computer. (Small meant that it filled only one room.) Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
Jerry Avins wrote:
> Spehro Pefhany wrote: > >> LOL. I remember the time we discovered the dufus^H^H^H^H customer >> had swapped the ground and hot wires in the line cord. Surprisingly, >> the test PC serial port survived. > > I'm glad the dufus^H^H^H^H customer survived. I remember when one > phase of the 220V line got connected to the 5V bus on a small > mainframe computer. (Small meant that it filled only one room.)
Over 40 years ago we lost a wall to wall breadboard (something like 6 full benches of wires, transistors, resistors, caps, and diodes) to a frayed soldering iron cord. Plastic transistors literally exploded. It took about two months to recover. You can see the end result at: <http://cbfalconer.home.att.net/firstpc/> Follow-ups set to remove excessive cross-posting. -- <http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt> <http://www.securityfocus.com/columnists/423> "A man who is right every time is not likely to do very much." -- Francis Crick, co-discover of DNA "There is nothing more amazing than stupidity in action." -- Thomas Matthews
On Sat, 10 Feb 2007 21:57:40 -0500, the renowned CBFalconer
<cbfalconer@yahoo.com> wrote:

>Jerry Avins wrote: >> Spehro Pefhany wrote: >> >>> LOL. I remember the time we discovered the dufus^H^H^H^H customer >>> had swapped the ground and hot wires in the line cord. Surprisingly, >>> the test PC serial port survived. >> >> I'm glad the dufus^H^H^H^H customer survived. I remember when one >> phase of the 220V line got connected to the 5V bus on a small >> mainframe computer. (Small meant that it filled only one room.) > >Over 40 years ago we lost a wall to wall breadboard (something like >6 full benches of wires, transistors, resistors, caps, and diodes) >to a frayed soldering iron cord. Plastic transistors literally >exploded. It took about two months to recover. You can see the >end result at: > > <http://cbfalconer.home.att.net/firstpc/> > >Follow-ups set to remove excessive cross-posting.
Y'all must have felt physically ill when that happened. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
On Feb 10, 3:26 pm, "panfilero" <panfil...@gmail.com> wrote:
> I'm pretty new to microcontrollers, how do I short the serial and get > it to echo? The development board I got is the: CME-12NE64-DEV
Okay, I have the same board on my desk.
> If I set serial > port 1 on codewarrior to load my MCU with the program, I was thinking > I could plug the other serial port into com 2 on my computer and have > hyperterminal set up on com 2, to recieve and transfer data.... I > don't know if I'm thinking about this correctly.
Well, two things to keep in mind. One is that when you use the serial monitor instead of a BDM pod, you loose SCIA. So make sure you code is talking to the registers for SCIB. The second thing is that your board can do some funky IR serial comms. There's a dip switch near the second serial port, and you need to have that set appropriately so that you have the serial level shifter hooked up to the MCU and not the IR thingy instead/also. I will never admit how much time I wasted trying to figure out where those extra characters were coming from! Last piece of advice: do yourself a favor and spring for a USB BDM pod. It's relatively cheap (less than half the cost of your eval board) and gives you full access to the chip, and both serial ports. In terms of testing, I would recommend you try to get the NE64 sending at the PC first. Stick a good old LED between the TXD and ground and see that it's doing something (then halt your processor and see that it stops). The do the same thing for the PC - see that the led flashes when you hold down keys in the terminal program. Once they are both talking, you can see about pursuading them to listen - the NE64 receive fifo is only one deep so your probably want interrupts (my interrupt routine just copies the characters into a software fifo for dealing with later at leisure)
 We are scared of being electrocuted ,
 so we put boxes around everything
 then hook box to the "nuetral"  AC .
  Then we isolate the output power
 supply from the AC mains , but there
  is so much coupling , scopes dont work .

   All for fear ,  for "safety" .

  The box is supposed to allow a
 path for current to open a ckt breaker ,
 instead of that wire making contact
   with humans .
    It just makes jobs for gov't types .

  Now that high powered CPU's
 and color LCD's are low cost ,
 its a good time to trash some old
 obsolete software , like M$ and Linux
 and C++ .
  I now have 15 ARM cpu's in various
 boxes , like GP2X and NDS-Lite
 gameboxs .
   I will hack to install a piece of code
 that coexists for a while , then pushes
  out the orig OpSys .
    I will not use any of the popular
  methods , no C, no assemblers ,
    Its much faster and less agravating,
  cause i dont have to study anyones
  obtuse source code text .

  In several KB , i will have a non-text
  GUI dis-assembler .
    Track-ball and a low res LCD ....

    Hacking is fun ..