I have the latest (Aug 20) download of setupC.exe installed in its own folder.
I am trying to run the 'sample.c' file(in the CMSIS folder (dated 2-17-13). I've had to modify several xxx.h files.
I changed the LPCGPIOx nomenclature to match the BasicBoard, and they do turn the LED on/off .
the bit_bucket routine works for a delay BUT......
" start = LPC_TIM0->TC; while (LPC_TIM0->TC - start < 500000);" this and "delay_ms(1500)" hang the chip
'delay_ms()' is in the systick.files --
I added the (int)s to the sample.c file ---following the usage in cor_bitbang.c and it still didn't help.
"//grz start = (int) LPC_TIM0->TC; while (((int) LPC_TIM0->TC - start) < 5000000);"
'
I am at a loss for why the timing locks up -- the other parts of the program work & putchar(t) as a debug around the original timing
statements work.
'
Olzeke51
PS this is low priority - I can use the bit_bucket for time delays.
PPS. I even tried the "WAIT (1500)" statement I found in the 'Csample.c" program - still no go.
MakeItC - time delays
Re: MakeItC - time delays
Well for our use of the BASICchip we use SysTick to generate the microsecond timing, so the setup we use will not use TIMER0
We do call it the BASICchip for a reason, and not sure why you would buy it from us and not Digikey or Mouser if you plan to use it for C
</snarky comment>
We do call it the BASICchip for a reason, and not sure why you would buy it from us and not Digikey or Mouser if you plan to use it for C
</snarky comment>
Re: MakeItC - time delays
used an extra BasicChip to do the C learnin'-- couldn't wait (or want to pay freight) for a bare chip.
'
so -- in the Csample.c program [which compiled okay from your implication-] what does the 'WAIT ()' use ??
I took the 'delay_ms' routine from the systick.c file -- and I don't see a TIMER0 defined.
'
so two different time functions aren't working - with no denials/error because its an lpc1114.
'
am I beating a dead horse?? - suggestions for learning (nxp) ARM C ?? mbed??
olzeke51
'
'
BTW - I can now appreciate how convenient your Basic is -- thanks for all the work. gz
'
so -- in the Csample.c program [which compiled okay from your implication-] what does the 'WAIT ()' use ??
I took the 'delay_ms' routine from the systick.c file -- and I don't see a TIMER0 defined.
'
so two different time functions aren't working - with no denials/error because its an lpc1114.
'
am I beating a dead horse?? - suggestions for learning (nxp) ARM C ?? mbed??
olzeke51
'
'
BTW - I can now appreciate how convenient your Basic is -- thanks for all the work. gz