Search found 640 matches

by chipfryer27
Sun Dec 31, 2023 12:40 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi With SPI there can only ever be one Master but as many slaves as you wish. Usually MOSI/MISO are connected to each slave with unique CS/SS pins that let each slave know it by itself is being addressed. MOSI is Master Out Slave In and is unidirectional from master to slave device MISO is Master In...
by chipfryer27
Sat Dec 30, 2023 8:56 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi And on the CS of the receiving controller, you need to apply "0" in any way-either connect to the minus circuit, or apply a logical 0 to the output, and after receiving, apply a logical 1. I tried both options. When a logical 0 was applied to the CS output and then 1 That sounds to me the descrip...
by chipfryer27
Fri Dec 29, 2023 5:22 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

What is it exactly you want to achieve? Is it just to have two chips send bytes to each other, or are you intending to just read or write from one to another? Will the data be in the same format each time (e.g. a four byte array or string)?

Regards
by chipfryer27
Fri Dec 29, 2023 1:27 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi I created a simple chart to send a single value out on the SPI. Chart uses SPI Master component and has C5 = MOSI C4 = MISO C3 = Clock C2 = CS/SS Clock idles high and CS/SS is active low. The below shows the traces captured on a logic analyser set to trigger on CS falling edge. MOSI.jpg I'll crea...
by chipfryer27
Thu Dec 28, 2023 5:39 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi I think there is a misunderstanding in the use of Interrupts. It only needs to be enabled once, outside of your loop. Once enabled it will continue to call your Interrupt Service Routine (ISR) every time it is triggered, until you disable it. If for example you triggered on the falling edge of IN...
by chipfryer27
Tue Dec 26, 2023 11:48 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Whilst your traces are helpful, what would be very helpful is to use both of your channels and post, along with more explicit details of what they are capturing. You mention when two "wizards" are connected they both send data from MISO pins. Being honest, I really have no idea of what your trace...
by chipfryer27
Mon Dec 25, 2023 11:19 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Your two traces look as expected. However without any form of interrupt it will be practically impossible to capture any received byte as without such you are relying on nothing more than pure chance that something will be present when you look (including clock). If you do manage, can you please ...
by chipfryer27
Sun Dec 24, 2023 9:39 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

Merry Christmas to you too and a Happy New year when it arrives.

If you triggered on falling edge, then looked for incoming data you would have a reasonable chance of catching it especially if using an appropriate timeout value.

Have a good festive season.

Regards
by chipfryer27
Sat Dec 23, 2023 9:52 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Following on from Viktor, I think you need to provide a little more information. We don't know what, if anything, you are connected to that transmits / receives your data. From looking at your chart it appears that after you initialise you enter a loop. In each iteration you enable an interrupt. ...
by chipfryer27
Wed Dec 20, 2023 10:07 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

If I haven't used a scope in a while it takes me more than a few minutes to refamiliarise myself with it. I actually have a few and as they are all different the fun knowns no beginning.....

When I'm next beside one I'll capture a transmission and post for comparison.

Regards
by chipfryer27
Sat Dec 09, 2023 10:59 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi I don't have that chip so cannot test with it, but I think it unlikely that there is an SPI issue as it has been around for a long time and if there was an issue it would have been flagged before now (I would hope). How long does your scope run for once triggered? It may only be able to capture o...
by chipfryer27
Sat Dec 09, 2023 8:15 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

You updated as I was replying :)

Assuming you have a two channel scope (at least) set it to trigger on CS going low (when you push your button to start) with the other channel on MOSI. You should see CS go low then shortly afterward a burst of MOSI data before CS returns to high.

Regards
by chipfryer27
Sat Dec 09, 2023 8:03 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

To simulate in FC I changed to CS pin from B2 to C2 and could then use the datalogger to see what was happening on the pins. For some reason it wouldn't let me use B2.

It ran fine in simulation.

In hardware, how are you monitoring the pins?

Regards
by chipfryer27
Fri Dec 08, 2023 10:41 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

I'm always a little sceptical if purely relying on any simulation, so it is good to hear your hardware is performing as expected.

Regards
by chipfryer27
Wed Nov 15, 2023 10:47 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

I've been a bit busy during the last week, but when I get time I'll try and get something running.

Regards
by chipfryer27
Sat Nov 11, 2023 9:56 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

I'm a bit confused. In an earlier post you said you were going to try the PIC16F1939, which does have an SSP interrupt, so should be quite simple to achieve, and the WiKi examples can easily be modified for the target.

Are you now saying that you still wish to persevere with the Mega8?

Regards
by chipfryer27
Wed Nov 08, 2023 6:42 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Matrix do offer support, but obviously their focus is on the more recent versions. V8 is quite old now. Have you considered obtaining v10? All components are now free as are many "chips". The user forums I believe offer fair support from within the FC community. As to the above, the cheap logic a...
by chipfryer27
Tue Nov 07, 2023 10:47 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Martin That is an issue for sure. In the WiKi the examples show the use of the SSP interrupt but not all chips have this facility nor does his target an ATMega8. There is (I think) an SPI flag that gets set so I'm guessing a custom interrupt may be necessary, which isn't my strong point but this ...
by chipfryer27
Tue Nov 07, 2023 2:37 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Whilst it is good you are getting traces I still think you have issues with CS/SS pin. I would expect it to idle high only going low for the duration of transmission, and as I mentioned earlier certain Slaves won't actually do anything with the incoming data until the pin returns to high. Yes, ev...
by chipfryer27
Mon Nov 06, 2023 9:08 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Sorry to be brief, just heading out. Using PICs I've had lot's of "fun" with SPI and it rarely works first time for me, but that is because I've done something dumb :oops: I use a logic analyser to monitor my pins so I can see in real-time what is happening and it will also decode too. Even the c...
by chipfryer27
Sun Nov 05, 2023 3:02 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi

I've only just obtained the necessary licences to allow me to use that chip in v8.

I'll try and check in the next day or two.

Regards
by chipfryer27
Tue Oct 31, 2023 8:53 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Just heading out. AV.... many posts regarding issues with such, although not so many now. It can really screw things up. Glad to hear you have it resolved. I didn't rewrite, I just downloaded your code which compiled to both C and Hex without any issue. When you update, remember to check "full da...
by chipfryer27
Tue Oct 31, 2023 5:11 am
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Guessing you are using an "educational" license? I am not familiar with that version of Flowcode so can't help regarding the messages you are seeing. It looks like it has features different to the other versions. Whilst I have FC v5 - v10 on my machine, I only have a license for your chip in v9 o...
by chipfryer27
Mon Oct 30, 2023 10:25 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi Busy over the next couple of days so my replies may be limited. I'm not very familiar with your chip, however I downloaded your chart and it seems that it should work providing the interrupt is called at the correct time. Without knowing what it is connected to and how that relates to an incoming...
by chipfryer27
Sat Oct 28, 2023 9:02 pm
Forum: Flowcode V8
Topic: some problems with spi data transmission
Replies: 140
Views: 7956101

Re: some problems with spi data transmission

Hi I see you seem to be simulating in Proteus. That's not something I'm over familiar with, but note that when simulating any microcontroller in any software you add in an extra level of "pain" :) Many other factors now add their toll to what you hope to see, so just because something doesn't seem t...