PDA

View Full Version : LONGssss



theFob
- 8th August 2013, 13:52
Hello,
I decide to test 2.50 long variables with sd card application. I wrote my own functions for write and read sectors. I don't use FS, but i do sequenced .bin file with predefined size ( i am reading MBR, FAT, ROOT DIR, etc ) and after writing there ( by sectors) i am cutting the "tail". So far is not essential.
Now.
I am using pure asm interrupts, high and low.
I am using FSRx (POSTINCx) in low_int to fill my buffer.
I am using a flag to wait (in loop) buffer_ready from low_int.
I am using LONG variable in that loop to address the next sector :
Sector_Address = Sector_Address + 1
That line give mistakes sometime !!!!!!
So i am cutting the "tail" till the head ( MBR ) sometimes, you know what that mean ....:frown:

Can someone help me please!
How these LONG variables work, they use FSR or what ?

ps mcu is 26k20 with bootloader for 2620 .....

theFob
- 11th August 2013, 08:28
sorry, the problem is in my code. Had retfie instead bra restore in the middle of the interrupt, which is low, need restore ...
If any is interested in 2 interleaved 512B FIFOs capturing port value, i will post that part.

My favor soft till now is Circuit Maker, Picbasic and Proteus. I will buy Silver this week.
Picbasic is great for small to middle projects. In some cases i write procedure in Picbasic and then translate it to assembler.
Strange, eh? C is more close to mcu hardware, but there are drawbacks because of that too ...
Regards