Page 2 of 2

Re: EEPROM/FLASH dspMIAC

Posted: Fri Dec 21, 2018 2:43 pm
by gavo4
Still no luck...I now can't read card 1 (showing the 3 infront) and it also keeps running in a loop,

Regards,

Gavin

Re: EEPROM/FLASH dspMIAC

Posted: Fri Dec 21, 2018 2:47 pm
by LeighM
Can you post your latest program?

Please check the Yes No of the new decision icon, they are swapped from normal.

Re: EEPROM/FLASH dspMIAC

Posted: Fri Dec 21, 2018 3:14 pm
by gavo4
Hi Leigh,

Please see attached,

Looks the data is not written to Save_Data for the exception of B0[0]

Regards,

Gavin

Re: EEPROM/FLASH dspMIAC

Posted: Fri Dec 21, 2018 5:28 pm
by LeighM
It might be a good idea to step through your program in the simulator.
After stepping over the read string from uart you can use the watch variables to edit the string to whatever you want to test all the options and check that the program is executing as you expect.

Re: EEPROM/FLASH dspMIAC

Posted: Fri Dec 21, 2018 8:37 pm
by gavo4
Hi Leigh,

Ok I have it working now doing something different which I have attached, only problem is I need card 1 then card 2 etc I can't randomly choose a card which is a major problem for me, at least now it saves the data.

I still can't understand why it is doing what it is in the previous routine, it just does not make sense?, it keeps running in a loop before it can save any data?

Regards,

Gavin

Re: EEPROM/FLASH dspMIAC

Posted: Sat Dec 22, 2018 2:02 pm
by LeighM
Glad to hear it's working now, and you are nearer to what you want.
Do you mean you need to detect card 1 after a previous detect of card 1?
If so, sounds like you need a timer and a flag, that is cleard when card detected (string input), then set it again after a timeout.
Then if you get a string input and the flag is set you know it's a new event.
This is assuming you are getting multiple string inputs whilst the card is present.
You probably need to think a bit more about your overall program flow.

Re: EEPROM/FLASH dspMIAC

Posted: Sat Dec 22, 2018 2:10 pm
by gavo4
Hi Leigh,

I tried the attached, seems to work but still very buggy....

Regards,

Gavin

Re: EEPROM/FLASH dspMIAC

Posted: Sat Dec 22, 2018 2:12 pm
by gavo4
Hi Leigh,

Ok thanks!,

Sounds like what I need, I need to detect any card that has a "3" in it regardless of the position, do you have an examples of the timeout routine and flag that I could study?, or an example of what it should look like?

Regards,

Gavin

Re: EEPROM/FLASH dspMIAC

Posted: Sat Dec 22, 2018 2:33 pm
by gavo4
Hi Leigh,

I have just seen something very, very strange, please see attached, same code for the exception of the adding calculation for .idx_1 on the No side of the Decision. It's now not saving and doing exactly the same as the last first code which i still can't seem to understand why it does not work?, basically when I swipe the tag it saved the data and then goes back into a loop showing the position of the Card number for example D3DD0B1E will show 2 on the Display Cursor of 0.0 and it keeps going back there showing 2 without the tag being swiped?

I have no idea why it is doing this?, would you know why?

Regards,

Gavin

Re: EEPROM/FLASH dspMIAC

Posted: Sat Dec 22, 2018 4:05 pm
by gavo4
Hi Leigh,

This one attached looks really good!, lots of Macros but at least it looks good!,

My apologies for all the messages

Regards,

Gavin