Question about custom BOB for a 7i92

More
3 years 6 months ago - 3 years 6 months ago #270073 by blazini36
Replied by blazini36 on topic Question about custom BOB for a 7i92

I'll try and get to this in the next few days.

Note your pinout is missing the CS frame pin

(this enables the external /CS decoder, otherwise there is no way to de-assert /CS)

You could gain 4 pins by using an inmux module for the 8 GPIO inputs
This needs a 74HC251 external mux and now 4 interface pins (A0,A1,A2 and D)
It also add hardware debouncing and 4 MPG encoders
 
This decoder I used doesn't have an ena/inh pin so a CS Frame pin wouldn't have anywhere to go. Not being an SPI guru I didn't realize this was necessary, I figured each chip is de-asserted when another is selected via address lines but I gather that you mean it needs a global de-assertion.

I already sent the gerbers out for a prototype spin, I always assume I'll make at least one mistake 1st pass so it's not a huge deal

The docs are a little sparse on hostmot2 BSPI so I'm not sure what it can and can't do (man pages are missing). I've got the decoder selecting 4 10bit ADC's, If I omit 1 ADC that I don't really need, the other 3 decoded CS lines will be de-asserted when it's address is selected (1,1 on the input will select the missing 4th output.

Otherwise I can just remove the decoder for the time being and bodge through the 2 CS lines directly to the chips. I assume no frame pin is required when using straight CS lines. I only actually need the 2 for the machine this is going in. I might be able to get my friend to write the component for it so I'd just like to have something working. Do you know of any docs that explain the BSPI functions or is the 7i65 driver the only thing to go by?

I'll revisit the inmux thing if I have to revise it. I had just enough IO pins in the current layout. If I have to scrounge more IO pins using inmux I will probably drop the decoder since I'd only gain 1 CS line if I have to use a frame pin anyway.
Last edit: 3 years 6 months ago by blazini36.

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #270076 by PCW
Replied by PCW on topic Question about custom BOB for a 7i92
If you only need 2 outputs from the decoder, the frame signal can go to A1

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #270080 by blazini36
Replied by blazini36 on topic Question about custom BOB for a 7i92

If you only need 2 outputs from the decoder, the frame signal can go to A1
 
That will probably work for now but just so I'm clear for whatever I do next....

Frame is required for the use of a decoder chip, correct? so it must be a chip with an inhibit/enable

If no decoder is used, no frame is necessary as it's typical SPI usage, correct?

Looking around I noticed reference that there used to be a dbspi driver in linuxcnc besides the bspi driver. I assume this got dripped based on the firmware module being configured specifically for the decoder? If that's the case I assume the (d)bspi version of the firmware always requires a frame pin?

For now what you suggested is probably the easiest thing to deal with. In the future I'll just change or do away with the decoder.
 

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #270083 by PCW
Replied by PCW on topic Question about custom BOB for a 7i92
I would suggest using a '138 decoder and bspi (saves 1 pin)

dbspi (decoded buffered SPI) doest seem to be supported in the hm2 driver
(though adding support would be trivial as it is identical register wise)
The following user(s) said Thank You: blazini36

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #270084 by blazini36
Replied by blazini36 on topic Question about custom BOB for a 7i92

I would suggest using a '138 decoder and bspi (saves 1 pin)

dbspi (decoded buffered SPI) doest seem to be supported in the hm2 driver
(though adding support would be trivial as it is identical register wise)
 
This exists in MachineKit:
[url] github.com/machinekit/machinekit-hal/blo...core/src/dbspi.c#L29 [/url]

The way MachineKit pulls things from LinuxCNC is a mystery to me but it looks like it was written by Andy so at some point it must have existed in LinuxCNC

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #270085 by PCW
Replied by PCW on topic Question about custom BOB for a 7i92
The machinekit code is fairly old I, I would either use bspi or update the linuxCNC
driver to support dbspi (there were a lot of recent  changes to support bspi properly with Ethernet cards)

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.458 seconds
Powered by Kunena Forum