Search:

Type: Posts; User: droseman

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thanks for your speedy and detailed response, I...

    Thanks for your speedy and detailed response, I can now see why this exercise might look unusual for an AV program, as you correctly pointed out, this is a learning exercise on the use of if...
  2. Exercise from Jumping into C++ triggers trojan alert

    Hello,

    I am working through Alex's excellent book, and while doing one of the practice exercises in the 'if statement' chapter which involved modifying a given password checker program


    ...
  3. Replies
    18
    Views
    4,591

    Thank you iMalc, that solution worked perfectly,...

    Thank you iMalc, that solution worked perfectly, and I now know some more about bit manipulations :)

    --dave
  4. Replies
    18
    Views
    4,591

    thanks for the explanation laserlight, that makes...

    thanks for the explanation laserlight, that makes complete sense now.

    --dave
  5. Replies
    18
    Views
    4,591

    Thanks, useful responses as always on here. I...

    Thanks, useful responses as always on here.

    I have to congratulate nonoob, that is a concise solution, but I will have to sit down and work the logic through before I understand it fully.


    ...
  6. Replies
    18
    Views
    4,591

    Thats a good idea, but I think that it may be a...

    Thats a good idea, but I think that it may be a bit large considering I have only 32K for my code, maybe the mapping table could be 32 members,as I am ultimately dealing with 5-bit numbers here.
    ...
  7. Replies
    18
    Views
    4,591

    reversing bits in a truncated byte

    Hi,

    I have an embedded application where I read in 5 address lines (AD0-AD4) into 5 I/Os on my microcontroller, and as I seem to want to make life as hard for myself as possible I have connected...
  8. Replies
    4
    Views
    1,957

    fixed - sort of...

    due to looming deadline - the whole function was moved to scope main, choosing with an if...else statement.

    Would have been nice to do the other way, since it made main() a bit simpler, but...
  9. Replies
    4
    Views
    1,957

    hours_array is a global array variable which is...

    hours_array is a global array variable which is also declared extern in a header file



    The function EEPROM write calls a function which writes data to an attatched EEPROM device to be read back...
  10. Replies
    4
    Views
    1,957

    Calling functions from functions

    Hi

    I have in my application two functions which I call from main, called

    void write() and void ArrayFill(), which I can call from main() and operating as expected.

    I also have a function...
  11. Replies
    38
    Views
    4,418

    Hello shifu, Have you looked in the...

    Hello shifu,

    Have you looked in the documentation for your micro, there may be some library functions which can simplify your coding somewhat, there certainly are for the STM32 which I use.
    ...
  12. Replies
    15
    Views
    37,298

    Hi Adak, I have solved it myself, here is the...

    Hi Adak,

    I have solved it myself, here is the code which worked (I did remember to change the name of the array - I have a few arrays in my code (as you have probably realised, this is a small...
  13. Replies
    15
    Views
    37,298

    Cheers for that. Is there any way this can get...

    Cheers for that.

    Is there any way this can get itself stuck in an infinite loop, since that is what has happened when I put it into my main (embedded) application.

    --dave
  14. Replies
    15
    Views
    37,298

    Thanks Adak, that was indeed what I was trying to...

    Thanks Adak, that was indeed what I was trying to do.

    Yes, I really should have removed that comment..

    Would it be possible to ask why you set up the for loop like that and what tmp2 does,...
  15. Replies
    15
    Views
    37,298

    and as always, there is another complication... ...

    and as always, there is another complication...

    I have just realised that the array contains ASCII char values, which breaks this code, so I have tried this:



    #include <stdio.h>

    int...
  16. Replies
    15
    Views
    37,298

    Thank you very much kermitaner, that was exactly...

    Thank you very much kermitaner, that was exactly what I was after - have yourself a fine Hannovarian beer !

    To laserlight - thanks for pointing out those functions, I had not heard of those...
  17. Replies
    15
    Views
    37,298

    Cheers, I can see that now. Retesting without...

    Cheers, I can see that now. Retesting without that statement gives me -100000...

    What I actually want to do is take the calculated value of tmp and add it to the previous value, but I don't know...
  18. Replies
    15
    Views
    37,298

    convert char array to integer number

    Hello,

    I am attempting to convert a number from an array of chars into a reconstructed number. For example if I have an array:


    char array[5] = {5,4,3,2,1};

    How can I convert it into
    ...
  19. Replies
    12
    Views
    1,682

    that certainly looks much simpler, but I got the...

    that certainly looks much simpler, but I got the other method working and its integrated into my code, with the correct addresses happily being sent to my serial port, so I am a happy camper all...
  20. Replies
    12
    Views
    1,682

    thanks to kennedy and mk for your ideas. Both...

    thanks to kennedy and mk for your ideas. Both would work for me. In your opinion, which of these approaches is likely to have a smaller code footprint?

    I went to put this in a test program, but...
  21. Replies
    12
    Views
    1,682

    that makes a bit of sense, but why modulo...

    that makes a bit of sense, but why modulo division for the lower nibble?



    On microcontrollers, functions like printf are not included in the library since they are too resource hungry. Makes a...
  22. Replies
    12
    Views
    1,682

    converting a hex value into a string

    Hi,

    In a section of my code I have a number in hex (in the range 0x00 to 0xFE) and I need to get this into an ASCII string. Also, because I don't have printf (or its variations) I can't use...
  23. Replies
    4
    Views
    2,460

    Thanks for that info Rocky, that sounds like just...

    Thanks for that info Rocky, that sounds like just what I need. Just to clarify, I invoke this function when I am declaring my arrays? Also, can I insert this code into a struct member declaration,...
  24. Replies
    4
    Views
    2,460

    what to do with unused array elements

    Hello,

    I have some arrays in my code which will contain different messages of varying lengths, so I have sized my arrays to take the longest ones (plus 1 or two elements on the end), but how do I...
  25. Replies
    4
    Views
    3,987

    using UML to plan C programs

    Hi,

    I am doing my first major project in C for an embedded platform, with many functions and files involved, and I want to use a similar process to UML used in Java programming, but I can't find...
Results 1 to 25 of 84
Page 1 of 4 1 2 3 4