Author Topic: Old microcontrollers: should I bother hanging on those?  (Read 12441 times)

0 Members and 4 Guests are viewing this topic.

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Old microcontrollers: should I bother hanging on those?
« Reply #25 on: June 07, 2017, 12:08:34 am »
The LP2103 has been around for a very long time. It has some nice features which still make it an interesting & usefull controller. AFAIK this is quite a popular model. FWIW Farnell has 350 on order for delivery this month.
Is it worth it for me to build a new dev board for it?

In my view, yes.

Somewhere along the path comes Arduino where there is quite a bit of hand-holding and huge provided libraries and tons of examples.  At the other end of the scale there are the Cortex M series ARMs that usually come with a flood of driver code you didn't (need to) write but you now need to understand.  Everything is hidden in magic STRUCTs fed into somebody else's code.

In the middle, with no hand-holding and no driver code, are the ARM 7TDMIs.  It seems to me that these are a great transition between Arduino and ARM Cortex M series because you will write all your own code and all of it will be based on an understanding of the User Manual (plus the Datasheet in the case of NXP).  You will deal directly with the hardware and, if you use STRUCTs, they will be your STRUCTs.  The good news is that the chips like the LPC2138 are easy to code; the peripherals are pretty straightforward and well documented.  I like the brevity of coding for these chips.  Set up a few registers and watch it rip!
For such a dev board, is it a good idea to keep the Arduino form factor?

Speaking of Cortex-M, I never use their driver code except the vendor-agnostic CMSIS (which almost never uses the structs)
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9988
  • Country: us
Re: Old microcontrollers: should I bother hanging on those?
« Reply #26 on: June 07, 2017, 02:10:10 pm »
The LP2103 has been around for a very long time. It has some nice features which still make it an interesting & usefull controller. AFAIK this is quite a popular model. FWIW Farnell has 350 on order for delivery this month.
Is it worth it for me to build a new dev board for it?

In my view, yes.

Somewhere along the path comes Arduino where there is quite a bit of hand-holding and huge provided libraries and tons of examples.  At the other end of the scale there are the Cortex M series ARMs that usually come with a flood of driver code you didn't (need to) write but you now need to understand.  Everything is hidden in magic STRUCTs fed into somebody else's code.

In the middle, with no hand-holding and no driver code, are the ARM 7TDMIs.  It seems to me that these are a great transition between Arduino and ARM Cortex M series because you will write all your own code and all of it will be based on an understanding of the User Manual (plus the Datasheet in the case of NXP).  You will deal directly with the hardware and, if you use STRUCTs, they will be your STRUCTs.  The good news is that the chips like the LPC2138 are easy to code; the peripherals are pretty straightforward and well documented.  I like the brevity of coding for these chips.  Set up a few registers and watch it rip!
For such a dev board, is it a good idea to keep the Arduino form factor?

Speaking of Cortex-M, I never use their driver code except the vendor-agnostic CMSIS (which almost never uses the structs)

I hadn't thought about using the Arduino form factor but if the LPC2138 has the right IO configuration, why not?  The pins need to be brought out somehow, it might as well be a 'standard'.  You could even use the same USB->serial chip (I think) and it might as well have the optional ability to provide power to the board via USB power.
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Old microcontrollers: should I bother hanging on those?
« Reply #27 on: June 07, 2017, 02:24:26 pm »
The LP2103 has been around for a very long time. It has some nice features which still make it an interesting & usefull controller. AFAIK this is quite a popular model. FWIW Farnell has 350 on order for delivery this month.
Is it worth it for me to build a new dev board for it?

In my view, yes.

Somewhere along the path comes Arduino where there is quite a bit of hand-holding and huge provided libraries and tons of examples.  At the other end of the scale there are the Cortex M series ARMs that usually come with a flood of driver code you didn't (need to) write but you now need to understand.  Everything is hidden in magic STRUCTs fed into somebody else's code.

In the middle, with no hand-holding and no driver code, are the ARM 7TDMIs.  It seems to me that these are a great transition between Arduino and ARM Cortex M series because you will write all your own code and all of it will be based on an understanding of the User Manual (plus the Datasheet in the case of NXP).  You will deal directly with the hardware and, if you use STRUCTs, they will be your STRUCTs.  The good news is that the chips like the LPC2138 are easy to code; the peripherals are pretty straightforward and well documented.  I like the brevity of coding for these chips.  Set up a few registers and watch it rip!
For such a dev board, is it a good idea to keep the Arduino form factor?

Speaking of Cortex-M, I never use their driver code except the vendor-agnostic CMSIS (which almost never uses the structs)

I hadn't thought about using the Arduino form factor but if the LPC2138 has the right IO configuration, why not?  The pins need to be brought out somehow, it might as well be a 'standard'.  You could even use the same USB->serial chip (I think) and it might as well have the optional ability to provide power to the board via USB power.
I am using LPC2103, not 2138. It does have the correct types and amount of I/O for an Arduino Uno sized board. However I do have to put some consideration into the JTAG interface, as it calls for a full 20-pin J-Link style connector (which will make the board slightly longer than Arduino Uno.) Maybe I can pack an additonal ESP8266 module on there if I have two extra pins?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9988
  • Country: us
Re: Old microcontrollers: should I bother hanging on those?
« Reply #28 on: June 07, 2017, 05:03:09 pm »

I am using LPC2103, not 2138. It does have the correct types and amount of I/O for an Arduino Uno sized board. However I do have to put some consideration into the JTAG interface, as it calls for a full 20-pin J-Link style connector (which will make the board slightly longer than Arduino Uno.) Maybe I can pack an additonal ESP8266 module on there if I have two extra pins?

Sorry about the 2138 bit, I got this thread confused with the other one.  You could just use serial programming and skip the JTAG but you would lose debugging.  Adding the ESP8266 would be sweet!
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Old microcontrollers: should I bother hanging on those?
« Reply #29 on: June 08, 2017, 01:00:07 am »

I am using LPC2103, not 2138. It does have the correct types and amount of I/O for an Arduino Uno sized board. However I do have to put some consideration into the JTAG interface, as it calls for a full 20-pin J-Link style connector (which will make the board slightly longer than Arduino Uno.) Maybe I can pack an additonal ESP8266 module on there if I have two extra pins?

Sorry about the 2138 bit, I got this thread confused with the other one.  You could just use serial programming and skip the JTAG but you would lose debugging.  Adding the ESP8266 would be sweet!
The chip came with two hardware UARTs: one for ISP and communication to the computer, and the other for ESP8266. Now I need to figure out how to build the (slightly complicated) bootloader switching circuit.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9988
  • Country: us
Re: Old microcontrollers: should I bother hanging on those?
« Reply #30 on: June 08, 2017, 03:02:05 pm »
The chip came with two hardware UARTs: one for ISP and communication to the computer, and the other for ESP8266. Now I need to figure out how to build the (slightly complicated) bootloader switching circuit.

I think you just need 2 pushbuttons:  One to do the reset and the other to signal you want the device to go into ISP mode.  Of course, that puts some usage limitations on the ISP pin - P0-14.  Hold the bootloader button pressed while doing a reset.

See page 239 here:
http://www.nxp.com/documents/user_manual/UM10161.pdf
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Old microcontrollers: should I bother hanging on those?
« Reply #31 on: June 08, 2017, 04:13:20 pm »
The chip came with two hardware UARTs: one for ISP and communication to the computer, and the other for ESP8266. Now I need to figure out how to build the (slightly complicated) bootloader switching circuit.

I think you just need 2 pushbuttons:  One to do the reset and the other to signal you want the device to go into ISP mode.  Of course, that puts some usage limitations on the ISP pin - P0-14.  Hold the bootloader button pressed while doing a reset.

See page 239 here:
http://www.nxp.com/documents/user_manual/UM10161.pdf
I actually wanted to implement the 1200 baud or DTR line trick used by the Arduino folks, but the big question here is how. Two buttons seemed like an acceptable solution though.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9988
  • Country: us
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28888
  • Country: nl
    • NCT Developments
Re: Old microcontrollers: should I bother hanging on those?
« Reply #33 on: June 08, 2017, 08:41:37 pm »
The chip came with two hardware UARTs: one for ISP and communication to the computer, and the other for ESP8266. Now I need to figure out how to build the (slightly complicated) bootloader switching circuit.
I think you just need 2 pushbuttons:  One to do the reset and the other to signal you want the device to go into ISP mode.  Of course, that puts some usage limitations on the ISP pin - P0-14.  Hold the bootloader button pressed while doing a reset.

See page 239 here:
http://www.nxp.com/documents/user_manual/UM10161.pdf
I actually wanted to implement the 1200 baud or DTR line trick used by the Arduino folks, but the big question here is how. Two buttons seemed like an acceptable solution though.
If you buy a USB to serial converter with RTS and CTS lines then Flashmagic can control the reset and bootloader entry pins directly on any NXP LPC ARM controller. Put a switch in between and you have a convenient programming solution.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9988
  • Country: us
Re: Old microcontrollers: should I bother hanging on those?
« Reply #34 on: June 09, 2017, 12:12:12 am »
The chip came with two hardware UARTs: one for ISP and communication to the computer, and the other for ESP8266. Now I need to figure out how to build the (slightly complicated) bootloader switching circuit.
I think you just need 2 pushbuttons:  One to do the reset and the other to signal you want the device to go into ISP mode.  Of course, that puts some usage limitations on the ISP pin - P0-14.  Hold the bootloader button pressed while doing a reset.

See page 239 here:
http://www.nxp.com/documents/user_manual/UM10161.pdf
I actually wanted to implement the 1200 baud or DTR line trick used by the Arduino folks, but the big question here is how. Two buttons seemed like an acceptable solution though.
If you buy a USB to serial converter with RTS and CTS lines then Flashmagic can control the reset and bootloader entry pins directly on any NXP LPC ARM controller. Put a switch in between and you have a convenient programming solution.

Yes!  I had forgotten about FlashMagic.  Somewhere along the line, I migrated to JTAG and forgot my roots...

It's all right here:
http://www.flashmagictool.com/assets/resources/PoUSB12LPCProg.pdf
 

Offline technixTopic starter

  • Super Contributor
  • ***
  • Posts: 3508
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Old microcontrollers: should I bother hanging on those?
« Reply #35 on: June 09, 2017, 09:31:14 am »
The chip came with two hardware UARTs: one for ISP and communication to the computer, and the other for ESP8266. Now I need to figure out how to build the (slightly complicated) bootloader switching circuit.
I think you just need 2 pushbuttons:  One to do the reset and the other to signal you want the device to go into ISP mode.  Of course, that puts some usage limitations on the ISP pin - P0-14.  Hold the bootloader button pressed while doing a reset.

See page 239 here:
http://www.nxp.com/documents/user_manual/UM10161.pdf
I actually wanted to implement the 1200 baud or DTR line trick used by the Arduino folks, but the big question here is how. Two buttons seemed like an acceptable solution though.
If you buy a USB to serial converter with RTS and CTS lines then Flashmagic can control the reset and bootloader entry pins directly on any NXP LPC ARM controller. Put a switch in between and you have a convenient programming solution.
CH340B have those lines... Maybe I can use a diode and a pull-up to make this work without affecting this pin being used as digital I/O.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf