Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
S12 External bus question - Adrian Vos - Feb 6 23:27:15 2007
Hi All,
I must admit that my experience with microcontrollers is mainly limitted to
single chip mode, but I have a need to connect a SJA1000 CAN controller to
an S12UF32. I realise it seems strange to be connecting a CAN controller
chip to an S12, as there are many S12 variants with CAN on board, but
unfortunately I need the USB capability of the UF32 and CAN in the same
application.
Now I am not that familiar with the external bus of the S12, but some
research has revealed that it can be setup as an 8 bit wide multiplexed
address/data bus. This is what is used by the SJA1000 CAN controller. The
difficulties I am having are with the bus control lines.
For a start, the SJA1000 requires an AS (motorola talk) or ALE (intel talk
for what seems to be the same signal) line to latch the address into the
SJA1000 prior to the chip being enabled which then causes it to read or
write the data. From what I can research on the S12 external bus, there is
no timing signal that can provide this AS signal. The S12 UF32 also has no
port K, and therefore has no external chip select control signal.
So my question is... what would be the best way to connect the SJA1000 to
the S12UF32? Can it be connected so that the SJA1000 can be accessed in
expanded mode with external glue logic or otherwise????? or would I be
better off to use a bit banging approach and manually produce the required
signals using generic IOs?
Alternatively, can anyone suggest a more elegant approach to adding CAN
support to the UF32? My application requires USB (preferrably 2.0), SD flash
card (preferrably full data mode), CAN. I found plenty of micros that can do
one of these requirements, and a few that can do two (including UF32). NXP
recently released a micro that has all 3, and if this all gets too hard, I
could always go that way?!?! :(
Thanks for any help!!
Cheers,
Adrian
Send instant messages to your online friends http://au.messenger.yahoo.com

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
RE: S12 External bus question - Tim Milliken - Feb 7 7:54:53 2007
Haveyou looked at the MCP2551 yet? I use that one and talking to it is easy and hassome
nice features in it as well. Might be what you are looking for. Tim
-----Original Message-----
From: 6...@yahoogroups.com[mailto:6...@yahoogroups.com] On Behalf Of AdrianVos
Sent: Tuesday, February 06, 200711:26 PM
To: 6...@yahoogroups.com
Subject: [68HC12] S12 External busquestion
Hi All,
I must admit that my experience with microcontrollers is mainly limitted to
single chip mode, but I have a need to connect a SJA1000 CAN controller to
an S12UF32. I realise it seems strange to be connecting a CAN controller
chip to an S12, as there are many S12 variants with CAN on board, but
unfortunately I need the USB capability of the UF32 and CAN in the same
application.
Now I am not that familiar with the external bus of the S12, but some
research has revealed that it can be setup as an 8 bit wide multiplexed
address/data bus. This is what is used by the SJA1000 CAN controller. The
difficulties I am having are with the bus control lines.
For a start, the SJA1000 requires an AS (motorola talk) or ALE (intel talk
for what seems to be the same signal) line to latch the address into the
SJA1000 prior to the chip being enabled which then causes it to read or
write the data. From what I can research on the S12 external bus, there is
no timing signal that can provide this AS signal. The S12 UF32 also has no
port K, and therefore has no external chip select control signal.
So my question is... what would be the best way to connect the SJA1000 to
the S12UF32? Can it be connected so that the SJA1000 can be accessed in
expanded mode with external glue logic or otherwise????? or would I be
better off to use a bit banging approach and manually produce the required
signals using generic IOs?
Alternatively, can anyone suggest a more elegant approach to adding CAN
support to the UF32? My application requires USB (preferrably 2.0), SD flash
card (preferrably full data mode), CAN. I found plenty of micros that can do
one of these requirements, and a few that can do two (including UF32). NXP
recently released a micro that has all 3, and if this all gets too hard, I
could always go that way?!?! :(
Thanks for any help!!
Cheers,
Adrian
Send instant messages to your online friends http://au.messenger.yahoo.com
---------------------------------
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
[Non-text portions of this message have been removed]

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: S12 External bus question - Michael Burgess - Feb 7 8:55:13 2007
Adrian,
I have a similar application, however, I use a regular HCS12 micro that
has CAN and use a third part
USB controller. In my case I use on from FTDI (FT232RL). This
controller interfaces directly to one of the
UARTs of the HCS12. Checkout www.ftdichip.com There are other vendors
that have USB controllers as well.
Hope this helps.
Michael Burgess
Adrian Vos wrote:
>
> Hi All,
>
> I must admit that my experience with microcontrollers is mainly
> limitted to
> single chip mode, but I have a need to connect a SJA1000 CAN
> controller to
> an S12UF32. I realise it seems strange to be connecting a CAN controller
> chip to an S12, as there are many S12 variants with CAN on board, but
> unfortunately I need the USB capability of the UF32 and CAN in the same
> application.
>
> Now I am not that familiar with the external bus of the S12, but some
> research has revealed that it can be setup as an 8 bit wide multiplexed
> address/data bus. This is what is used by the SJA1000 CAN controller. The
> difficulties I am having are with the bus control lines.
>
> For a start, the SJA1000 requires an AS (motorola talk) or ALE (intel
> talk
> for what seems to be the same signal) line to latch the address into the
> SJA1000 prior to the chip being enabled which then causes it to read or
> write the data. From what I can research on the S12 external bus,
> there is
> no timing signal that can provide this AS signal. The S12 UF32 also
> has no
> port K, and therefore has no external chip select control signal.
>
> So my question is... what would be the best way to connect the SJA1000 to
> the S12UF32? Can it be connected so that the SJA1000 can be accessed in
> expanded mode with external glue logic or otherwise????? or would I be
> better off to use a bit banging approach and manually produce the
> required
> signals using generic IOs?
>
> Alternatively, can anyone suggest a more elegant approach to adding CAN
> support to the UF32? My application requires USB (preferrably 2.0), SD
> flash
> card (preferrably full data mode), CAN. I found plenty of micros that
> can do
> one of these requirements, and a few that can do two (including UF32).
> NXP
> recently released a micro that has all 3, and if this all gets too
> hard, I
> could always go that way?!?! :(
>
> Thanks for any help!!
>
> Cheers,
>
> Adrian
>
> .
>
>

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: S12 External bus question - Adrian Vos - Feb 7 17:41:04 2007
The MCP2551 is a CAN transceiver.... but I need a CAN controller. I believe
you may have been referring to the MCP2515 which is a CAN controller with
SPI interface. Unfortunately the S12UF32 does not have SPI, so I could only
use this device by software emulation of SPI, and I feel this would be much
slower than software emulation of a parallel interface (with the SJA1000).
So I did indeed check this option, but I don't believe it is the best option
for the S12 UF32.
Thank for the suggestion!!
-- Adrian
----- Original Message -----
From: "Tim Milliken"
To: <6...@yahoogroups.com>
Sent: Wednesday, February 07, 2007 11:53 PM
Subject: RE: [68HC12] S12 External bus question
>
> Haveyou looked at the MCP2551 yet? I use that one and talking to it is
> easy and hassome nice features in it as well. Might be what you are
> looking for. Tim
>
> -----Original Message-----
> From: 6...@yahoogroups.com[mailto:6...@yahoogroups.com] On Behalf Of
> AdrianVos
> Sent: Tuesday, February 06, 200711:26 PM
> To: 6...@yahoogroups.com
> Subject: [68HC12] S12 External busquestion
>
> Hi All,
>
> I must admit that my experience with microcontrollers is mainly limitted
> to
> single chip mode, but I have a need to connect a SJA1000 CAN controller to
> an S12UF32. I realise it seems strange to be connecting a CAN controller
> chip to an S12, as there are many S12 variants with CAN on board, but
> unfortunately I need the USB capability of the UF32 and CAN in the same
> application.
>
> Now I am not that familiar with the external bus of the S12, but some
> research has revealed that it can be setup as an 8 bit wide multiplexed
> address/data bus. This is what is used by the SJA1000 CAN controller. The
> difficulties I am having are with the bus control lines.
>
> For a start, the SJA1000 requires an AS (motorola talk) or ALE (intel talk
> for what seems to be the same signal) line to latch the address into the
> SJA1000 prior to the chip being enabled which then causes it to read or
> write the data. From what I can research on the S12 external bus, there is
> no timing signal that can provide this AS signal. The S12 UF32 also has no
> port K, and therefore has no external chip select control signal.
>
> So my question is... what would be the best way to connect the SJA1000 to
> the S12UF32? Can it be connected so that the SJA1000 can be accessed in
> expanded mode with external glue logic or otherwise????? or would I be
> better off to use a bit banging approach and manually produce the required
> signals using generic IOs?
>
> Alternatively, can anyone suggest a more elegant approach to adding CAN
> support to the UF32? My application requires USB (preferrably 2.0), SD
> flash
> card (preferrably full data mode), CAN. I found plenty of micros that can
> do
> one of these requirements, and a few that can do two (including UF32). NXP
> recently released a micro that has all 3, and if this all gets too hard, I
> could always go that way?!?! :(
>
> Thanks for any help!!
>
> Cheers,
>
> Adrian
>
> Send instant messages to your online friends http://au.messenger.yahoo.com
> ---------------------------------
> Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
>
> [Non-text portions of this message have been removed]
> Yahoo! Groups Links
Send instant messages to your online friends http://au.messenger.yahoo.com

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )Re: S12 External bus question - Adrian Vos - Feb 7 17:52:19 2007
I did consider this approach Michael, but I have actually got the USB side
of it working very well with the UF32. There is alot of benefit in being
able to do the USB yourself if you have the time and inclination to learn
about USB. I now have the UF32 coming up under windows XP as a composite
device which means that one physical USB connection has multiple windows
devices. When I plug in the UF32 device, it comes up as both a mass storage
device (the SD card), and a virutal com port. Also, it uses the built in
windows drivers, so there is no need to install 3rd party drivers.
I could do the same thing with any USB controller device that gives you
direct control of the descriptors and endpoints, but the UF32 has the on
board support for the SD card which is what I was after. Unfortunately
getting the UF32 to do CAN is proving to be quite difficult, but I am sure I
can get it talking to an external CAN controller somehow!!
Thanks for the suggestion!!
If there is anyone out there who can suggest the best way to connect a
device using the intel style expanded multipleced address/data bus to the
S12 expanded bus that would be much appreciated. It needs to support the
control lines AS or ALE, CS, and either WR and RD or RD/WR and E. I think I
may be able to use some glue logic to create these signals, but I am sure
this has been done before, so would really appreciate direction on this.
-- Adrian
----- Original Message -----
From: "Michael Burgess"
To: <6...@yahoogroups.com>
Sent: Thursday, February 08, 2007 12:52 AM
Subject: Re: [68HC12] S12 External bus question
> Adrian,
> I have a similar application, however, I use a regular HCS12 micro that
> has CAN and use a third part
> USB controller. In my case I use on from FTDI (FT232RL). This
> controller interfaces directly to one of the
> UARTs of the HCS12. Checkout www.ftdichip.com There are other vendors
> that have USB controllers as well.
> Hope this helps.
>
> Michael Burgess
>
> Adrian Vos wrote:
>>
>> Hi All,
>>
>> I must admit that my experience with microcontrollers is mainly
>> limitted to
>> single chip mode, but I have a need to connect a SJA1000 CAN
>> controller to
>> an S12UF32. I realise it seems strange to be connecting a CAN controller
>> chip to an S12, as there are many S12 variants with CAN on board, but
>> unfortunately I need the USB capability of the UF32 and CAN in the same
>> application.
>>
>> Now I am not that familiar with the external bus of the S12, but some
>> research has revealed that it can be setup as an 8 bit wide multiplexed
>> address/data bus. This is what is used by the SJA1000 CAN controller. The
>> difficulties I am having are with the bus control lines.
>>
>> For a start, the SJA1000 requires an AS (motorola talk) or ALE (intel
>> talk
>> for what seems to be the same signal) line to latch the address into the
>> SJA1000 prior to the chip being enabled which then causes it to read or
>> write the data. From what I can research on the S12 external bus,
>> there is
>> no timing signal that can provide this AS signal. The S12 UF32 also
>> has no
>> port K, and therefore has no external chip select control signal.
>>
>> So my question is... what would be the best way to connect the SJA1000 to
>> the S12UF32? Can it be connected so that the SJA1000 can be accessed in
>> expanded mode with external glue logic or otherwise????? or would I be
>> better off to use a bit banging approach and manually produce the
>> required
>> signals using generic IOs?
>>
>> Alternatively, can anyone suggest a more elegant approach to adding CAN
>> support to the UF32? My application requires USB (preferrably 2.0), SD
>> flash
>> card (preferrably full data mode), CAN. I found plenty of micros that
>> can do
>> one of these requirements, and a few that can do two (including UF32).
>> NXP
>> recently released a micro that has all 3, and if this all gets too
>> hard, I
>> could always go that way?!?! :(
>>
>> Thanks for any help!!
>>
>> Cheers,
>>
>> Adrian
>>
>> .
>>
>> Yahoo! Groups Links
Send instant messages to your online friends http://au.messenger.yahoo.com

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )RE: S12 External bus question - Jonathan Masters - Feb 7 17:59:50 2007
Adrian,
Perhaps cost is an issue, but what about using another HC12 as your CAN
interface and then interfacing the two HC12's by SPI or SCI?
Jonathan.
-----Original Message-----
From: 6...@yahoogroups.com [mailto:6...@yahoogroups.com] On Behalf
Of Adrian Vos
Sent: Thursday, 8 February 2007 9:51 AM
To: 6...@yahoogroups.com
Subject: Re: [68HC12] S12 External bus question
I did consider this approach Michael, but I have actually got the USB
side
of it working very well with the UF32. There is alot of benefit in being
able to do the USB yourself if you have the time and inclination to
learn
about USB. I now have the UF32 coming up under windows XP as a composite
device which means that one physical USB connection has multiple windows
devices. When I plug in the UF32 device, it comes up as both a mass
storage
device (the SD card), and a virutal com port. Also, it uses the built in
windows drivers, so there is no need to install 3rd party drivers.
I could do the same thing with any USB controller device that gives you
direct control of the descriptors and endpoints, but the UF32 has the on
board support for the SD card which is what I was after. Unfortunately
getting the UF32 to do CAN is proving to be quite difficult, but I am
sure I
can get it talking to an external CAN controller somehow!!
Thanks for the suggestion!!
If there is anyone out there who can suggest the best way to connect a
device using the intel style expanded multipleced address/data bus to
the
S12 expanded bus that would be much appreciated. It needs to support the
control lines AS or ALE, CS, and either WR and RD or RD/WR and E. I
think I
may be able to use some glue logic to create these signals, but I am
sure
this has been done before, so would really appreciate direction on this.
-- Adrian
----- Original Message -----
From: "Michael Burgess"
scan.com>
To: <68HC12@yahoogroups. com>
Sent: Thursday, February 08, 2007 12:52 AM
Subject: Re: [68HC12] S12 External bus question
> Adrian,
> I have a similar application, however, I use a regular HCS12 micro
that
> has CAN and use a third part
> USB controller. In my case I use on from FTDI (FT232RL). This
> controller interfaces directly to one of the
> UARTs of the HCS12. Checkout www.ftdichip.com There are other vendors
> that have USB controllers as well.
> Hope this helps.
>
> Michael Burgess
>
> Adrian Vos wrote:
>>
>> Hi All,
>>
>> I must admit that my experience with microcontrollers is mainly
>> limitted to
>> single chip mode, but I have a need to connect a SJA1000 CAN
>> controller to
>> an S12UF32. I realise it seems strange to be connecting a CAN
controller
>> chip to an S12, as there are many S12 variants with CAN on board, but
>> unfortunately I need the USB capability of the UF32 and CAN in the
same
>> application.
>>
>> Now I am not that familiar with the external bus of the S12, but some
>> research has revealed that it can be setup as an 8 bit wide
multiplexed
>> address/data bus. This is what is used by the SJA1000 CAN controller.
The
>> difficulties I am having are with the bus control lines.
>>
>> For a start, the SJA1000 requires an AS (motorola talk) or ALE (intel
>> talk
>> for what seems to be the same signal) line to latch the address into
the
>> SJA1000 prior to the chip being enabled which then causes it to read
or
>> write the data. From what I can research on the S12 external bus,
>> there is
>> no timing signal that can provide this AS signal. The S12 UF32 also
>> has no
>> port K, and therefore has no external chip select control signal.
>>
>> So my question is... what would be the best way to connect the
SJA1000 to
>> the S12UF32? Can it be connected so that the SJA1000 can be accessed
in
>> expanded mode with external glue logic or otherwise????? or would I
be
>> better off to use a bit banging approach and manually produce the
>> required
>> signals using generic IOs?
>>
>> Alternatively, can anyone suggest a more elegant approach to adding
CAN
>> support to the UF32? My application requires USB (preferrably 2.0),
SD
>> flash
>> card (preferrably full data mode), CAN. I found plenty of micros that
>> can do
>> one of these requirements, and a few that can do two (including
UF32).
>> NXP
>> recently released a micro that has all 3, and if this all gets too
>> hard, I
>> could always go that way?!?! :(
>>
>> Thanks for any help!!
>>
>> Cheers,
>>
>> Adrian
>>
>> .
>>
>> Yahoo! Groups Links
Send instant messages to your online friends http://au.messenger
.yahoo.com
[Non-text portions of this message have been removed]

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )Re: S12 External bus question - eqh2 - Feb 8 10:20:58 2007
> So my question is... what would be the best way to connect the
SJA1000 to
> the S12UF32? Can it be connected so that the SJA1000 can be accessed
in
> expanded mode with external glue logic or otherwise????? or would I
be
> better off to use a bit banging approach and manually produce the
required
> signals using generic IOs?
>
I don't have experience using the S12 in parallel mode but have a lot
of experience with the SJA1000. If the parallel connection is fairly
painful, I would just bit-bang it unless your application is pretty
demanding. In my experience, you typcially access the SJA1000 in 3
places; Initialization, preparing to transmit and an rx interrupt. So,
I don't think the extra bit banging will be too painful to manage
especially if you aren't sharing port registers with other tasks. Of
course, there could start to be a performance issue if you are at a
high baud rate and there is a LOT of message traffic.

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: Re: S12 External bus question - Adrian Vos - Feb 11 20:22:59 2007
Thanks for that... I think I will try bit banging.
Cheers,
Adrian
----- Original Message -----
From: "eqh2"
To: <6...@yahoogroups.com>
Sent: Friday, February 09, 2007 2:20 AM
Subject: [68HC12] Re: S12 External bus question
>> So my question is... what would be the best way to connect the
> SJA1000 to
>> the S12UF32? Can it be connected so that the SJA1000 can be accessed
> in
>> expanded mode with external glue logic or otherwise????? or would I
> be
>> better off to use a bit banging approach and manually produce the
> required
>> signals using generic IOs?
>>
> I don't have experience using the S12 in parallel mode but have a lot
> of experience with the SJA1000. If the parallel connection is fairly
> painful, I would just bit-bang it unless your application is pretty
> demanding. In my experience, you typcially access the SJA1000 in 3
> places; Initialization, preparing to transmit and an rx interrupt. So,
> I don't think the extra bit banging will be too painful to manage
> especially if you aren't sharing port registers with other tasks. Of
> course, there could start to be a performance issue if you are at a
> high baud rate and there is a LOT of message traffic.
> Yahoo! Groups Links
Send instant messages to your online friends http://au.messenger.yahoo.com

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )