Search the web
Sign In
New User? Sign Up
jallist · JAL mailing list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 27395 - 27424 of 27583   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#27424 From: "alancool_design" <alancool_design@...>
Date: Mon Nov 16, 2009 12:55 am
Subject: Re: 16f84
alancool_design
Offline Offline
Send Email Send Email
 
--- In jallist@yahoogroups.com, Helge <helgeww@...> wrote:
>
> [Default] On Sun, 15 Nov 2009 06:41:10 -0800 (PST), Alan Cool
> <alancool_design@...> wrote:
>
> >I seem to be able to do anything i want with the 16f877 chip regarding
blinking any number of leds in any sequence, however when i try to control two
leds on the 16f84 both leds come on together and turn off together even though
they should alternate, i attach the extracted code, would someone please be kind
enough to expose my error because there must be one.
>
> I can't see any problem with your code. Check for a hardware problem.
> Maybe your LEDs are not connected the same way? If you source one to
> GND and sink the other from Vcc, they will have opposite logic.
>
> To assist with hardware debugging, make a program that keeps both pins
> (or the entire port, if you want) high.
> --
> Helge
>
oh the simplest things take the longest time, i have now coloured my rails red
and black, i connected one to vcc. its so easy to assume you have made a code
error. thankyou so much regards Alan

#27423 From: Wayne <linuxone@...>
Date: Mon Nov 16, 2009 12:50 am
Subject: Re: Re: 16f84
wtopa
Offline Offline
Send Email Send Email
 
Alan Cool wrote:
> After being given some pointers recently which i am grateful for, i am getting
to grips with some basic programming.
> However i have a� problem that is driving me mad which is rekated to the
simplest of programs.
> I seem to be able to do anything i want with the 16f877 chip regarding
blinking any number of leds in any sequence, however when i try to�control two
leds on the 16f84 both leds come on together and turn off together even though
they should�alternate, i attach the extracted code, would someone please be
kind enough to expose my error because there must be one.
> Best regards
> Alan
>
> include 16f84a������������������
> --� 4 MHz�crystal
> pragma target clock 4_000_000�
>
> pragma target OSC� HS��������
> pragma target WDT� disabled�������
> enable_digital_io()��������������
> pin_A3_direction =� output
> pin_A1_direction =� output
> forever loop
> �� pin_a3 = on
> �� pin_a1 = off
> �� _usec_delay(250000)
> �� pin_a3 = off
> �� pin_a1 = on
> �� _usec_delay(250000)
> end loop
> --

On page 22 of the 16f84a data sheet there is a table of clock ranges.
It say that your "ppragma target OSC HS should be "pragma target OSC XT".

Other then that and maybe (?) the addition of
pragma WDT disabled
pragma LVP disabled
pragma MCLR disabled

a newbie like me sees nothing else wrong.

HTH

Wayne

#27422 From: "matthewschinkel" <matthewschinkel@...>
Date: Sun Nov 15, 2009 11:51 pm
Subject: Re: sd card reading
matthewschinkel
Offline Offline
Send Email Send Email
 
Hey Hans, my fat32 lib will be able to read data from any file on a fat32
formatted sd card (including midi files). I will have it for you shortly. Is
this what you are looking for?

Matt.

--- In jallist@yahoogroups.com, "Hansv" <hanzeman@...> wrote:
>
> Hi Matt,
> I have found your libs etc. Are you going to develop something for reading the
normal saved SD card files? In my project I should like to put a MIDI musicfile
on a SD card and read that afterwarts for the use in a punching machine (to make
barrelorgan rolls)
> Hans
>
> --- In jallist@yahoogroups.com, "colin.tallis" <colin.tallis@> wrote:
> >
> > Hi Matt
> >
> > I added the delay where you suggested but this did not appear to work.
> > However, if I place the delay in the sd_stop_write() procedure, it does
work. Tested on a 1GB Kingston and a 512MB unbranded card.
> >
> > Colin
> >
> > procedure sd_stop_write() is
> >   spi_master_hw = 0xFD -- send "stop transmission token"
> >   sd_set_idle()
> >   delay_1ms(10) -- add delay here
> > end procedure
> >
> >
> > --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@> wrote:
> > >
> > > Colin, I believe the correct way is to ask the SD card when it is ready
after writing, and I do this in the lib as specified by the datasheet. It is
possible that it may not be working correctly. Please add the 10ms delay in the
lib where I specified and let me know if it works for you, I will add it to the
lib untill I find a proper solution.
> > >
> > >
> > > I will get you guys a copy of my fat32 lib, hopefully this week. It also
works on hard disks with pata_hard_disk lib.
> > >
> > > Enzo.
> > > As for data logging, the FAT32 lib does not create files, so in order to
write to a specific file it will have to work like this:
> > >
> > > 1. use your PC to copy a large blank/junk file onto your sd card (this
will allocated some space for you to read/write to)
> > > 2. put your sd card in your circuit, hook it up to your serial port, turn
it on, you will get a directory listing
> > > 3. browse directories/files by sending the file number via serial port.
> > > 4. use fat32_file_open procedure to open a file
> > > 5. start writing. If you sent a 10mb blank file before, you will have 10mb
to write to.
> > >
> > > In the future, I will try to add something for creating files.
> > >
> > > Matt.
> > >
> > >
> > > --- In jallist@yahoogroups.com, "colin.tallis" <colin.tallis@> wrote:
> > > >
> > > >
> > > > Hi Matt,
> > > >
> > > > No documentation, but I have read on other forums that there needs to be
a wait period after sector write in order for the card to complete the internal
insructions. The delay may be different for your cards but it is a must for
mine. The delay is only required after write not read.
> > > >
> > > >
> > > >
> > > > Colin
> > > >
> > > >  --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@>
wrote:
> > > > >
> > > > > >  I have tested your sample program with 16f877 and 18f4520. Both
work, but with my Kingston 1GB card I need a small delay of about 10ms between
the write and read parts of the program. Presumably this is to allow time for
the card to do its internal housekeeping? Without this delay, the program hangs
after the "write to sector" part.
> > > > >
> > > > > Do you have any documentation on this 10ms delay? I did not see
anything about this in the datasheet and I have had no issues.
> > > > >
> > > > > If this is true, you can add a 10ms delay after line 271 (for write
sector), and after line 209 (for read sector) within the lib file.
> > > > >
> > > > > This lib is not compatible with Bert's book, although you may be able
to do some modifications. I suggest you give jallib a try, here is some
documentation that will help you:
> > > > >
> > > > > http://justanotherlanguage.org/content/tutorial_getting_started
> > > > > http://justanotherlanguage.org/content/tutorial_blink_a_led
> > > > >
> > > > > I will send you my fat32 lib + sample.
> > > > >
> > > > > Matt.
> > > > >
> > > >
> > >
> >
>

#27421 From: "dichiohare" <dichiohare@...>
Date: Sun Nov 15, 2009 11:20 pm
Subject: Re: New to PIC Programming and need help with Wisp648 error.
dichiohare
Offline Offline
Send Email Send Email
 
Hi Burt thank you for  your quick response.

I've checked the power on the breadboard and it is 4.96v is this enough or is
this causing the problem??

Also I've redone the board and the error is now:

Transferring program to 16F877A via Wisp648
Transferring program memory...OK!
Verifying program memory......failed at 000000, expected '120A', found : '3FFF'
Write-verify operation failed after 0.80 seconds, rc21

The 0.1 uf capacitors on the corners are:

0.1 uf 400v 10% metallised poly caps.

Hopefully I'm getting there.

Thank you

#27420 From: Helge <helgeww@...>
Date: Sun Nov 15, 2009 10:00 pm
Subject: Re: Re: 16f84
helgeww
Offline Offline
Send Email Send Email
 
[Default] On Sun, 15 Nov 2009 06:41:10 -0800 (PST), Alan Cool
<alancool_design@...> wrote:

>I seem to be able to do anything i want with the 16f877 chip regarding blinking
any number of leds in any sequence, however when i try to control two leds on
the 16f84 both leds come on together and turn off together even though they
should alternate, i attach the extracted code, would someone please be kind
enough to expose my error because there must be one.

I can't see any problem with your code. Check for a hardware problem.
Maybe your LEDs are not connected the same way? If you source one to
GND and sink the other from Vcc, they will have opposite logic.

To assist with hardware debugging, make a program that keeps both pins
(or the entire port, if you want) high.
--
Helge

#27419 From: "Bert van Dam" <bymco.bv@...>
Date: Sun Nov 15, 2009 3:02 pm
Subject: Re: New to PIC Programming and need help with Wisp648 error.
bertloopvogel
Offline Offline
Send Email Send Email
 
>Transferring program to 16F877A via Wisp648
>Transferring program memory...OK!
>Verifying program memory......failed at 000000, expected '120A', found :
>'0000'
>Write-verify operation failed after 0.80 seconds, rc21

This appears to be a power issue. Perhaps your powersupply is not stable
(enough), the 0.1 uF capacitors on the breadboard corners are missing, the
capacitors on the crystal are missing or one of the (four) powerlines to the
16F877A is not connected. Also check if all programmer wires are connected,
as well as the required components on pin 1.

Have fun,
Bert

www.vandam.tk

#27418 From: Alan Cool <alancool_design@...>
Date: Sun Nov 15, 2009 2:41 pm
Subject: Re: 16f84
alancool_design
Offline Offline
Send Email Send Email
 
After being given some pointers recently which i am grateful for, i am getting
to grips with some basic programming.
However i have a  problem that is driving me mad which is rekated to the
simplest of programs.
I seem to be able to do anything i want with the 16f877 chip regarding blinking
any number of leds in any sequence, however when i try to control two leds on
the 16f84 both leds come on together and turn off together even though they
should alternate, i attach the extracted code, would someone please be kind
enough to expose my error because there must be one.
Best regards
Alan

include 16f84a                  
--  4 MHz crystal
pragma target clock 4_000_000 

pragma target OSC  HS        
pragma target WDT  disabled       
enable_digital_io()              
pin_A3_direction =  output
pin_A1_direction =  output
forever loop
   pin_a3 = on
   pin_a1 = off
   _usec_delay(250000)
   pin_a3 = off
   pin_a1 = on
   _usec_delay(250000)
end loop
--




[Non-text portions of this message have been removed]

#27417 From: "dichiohare" <dichiohare@...>
Date: Sun Nov 15, 2009 12:54 pm
Subject: New to PIC Programming and need help with Wisp648 error.
dichiohare
Offline Offline
Send Email Send Email
 
Hi,

I've just purchased the Wisp648 programmer to accompany the "50 project for
beginners book" by Bert Van Dam.

I've set up my bread boards to the schematics for the first example and am now
trying to programme the PIC 16F877A using JAL Edit and xwisp2w.exe.

It seems to connect ok:

Detected programmer : Wisp648, firmware  version 1.29
switching communication speed from 19200 to 115200 bps
Portspeed min: 50, max: 115200, cur: 19200
Portspeed new: 115200
Verifying program memory......ok!
Verifying data memory.........ok!
Verifying ID memory...........ok!
Verifying fuses memory........ok!
Verify operation terminated successfully in 0.05 seconds
Reading file 'c:\picdev\projects\tutorialproject.hex'
File c:\picdev\projects\tutorialproject.hex loaded and is Intel format
conforming
Total of program and data memory: 346 bytes
Target erased

but I get the following error:

Transferring program to 16F877A via Wisp648
Transferring program memory...OK!
Verifying program memory......failed at 000000, expected '120A', found : '0000'
Write-verify operation failed after 0.80 seconds, rc21

I am using a usb to serial to connect the Wisp648 to the PC.

Once xwisp has run the LED on the Wisp648 remains on.

I am using a dc 9v power supply plugged into the Wisp648.

Running Xwisp from the command line using:

xwisp2w.exe port 9 force 16f877a verbose go
c:\picdev\projects\tutorialproject.hex

This produces the same error!

If anybody could help me with this problem it would be greatly appreciated.

Thank you in advance.

#27416 From: "Hansv" <hanzeman@...>
Date: Sun Nov 15, 2009 8:07 am
Subject: Re: sd card reading
hansvanveldh...
Offline Offline
Send Email Send Email
 
Hi Matt,
I have found your libs etc. Are you going to develop something for reading the
normal saved SD card files? In my project I should like to put a MIDI musicfile
on a SD card and read that afterwarts for the use in a punching machine (to make
barrelorgan rolls)
Hans

--- In jallist@yahoogroups.com, "colin.tallis" <colin.tallis@...> wrote:
>
> Hi Matt
>
> I added the delay where you suggested but this did not appear to work.
> However, if I place the delay in the sd_stop_write() procedure, it does work.
Tested on a 1GB Kingston and a 512MB unbranded card.
>
> Colin
>
> procedure sd_stop_write() is
>   spi_master_hw = 0xFD -- send "stop transmission token"
>   sd_set_idle()
>   delay_1ms(10) -- add delay here
> end procedure
>
>
> --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@> wrote:
> >
> > Colin, I believe the correct way is to ask the SD card when it is ready
after writing, and I do this in the lib as specified by the datasheet. It is
possible that it may not be working correctly. Please add the 10ms delay in the
lib where I specified and let me know if it works for you, I will add it to the
lib untill I find a proper solution.
> >
> >
> > I will get you guys a copy of my fat32 lib, hopefully this week. It also
works on hard disks with pata_hard_disk lib.
> >
> > Enzo.
> > As for data logging, the FAT32 lib does not create files, so in order to
write to a specific file it will have to work like this:
> >
> > 1. use your PC to copy a large blank/junk file onto your sd card (this will
allocated some space for you to read/write to)
> > 2. put your sd card in your circuit, hook it up to your serial port, turn it
on, you will get a directory listing
> > 3. browse directories/files by sending the file number via serial port.
> > 4. use fat32_file_open procedure to open a file
> > 5. start writing. If you sent a 10mb blank file before, you will have 10mb
to write to.
> >
> > In the future, I will try to add something for creating files.
> >
> > Matt.
> >
> >
> > --- In jallist@yahoogroups.com, "colin.tallis" <colin.tallis@> wrote:
> > >
> > >
> > > Hi Matt,
> > >
> > > No documentation, but I have read on other forums that there needs to be a
wait period after sector write in order for the card to complete the internal
insructions. The delay may be different for your cards but it is a must for
mine. The delay is only required after write not read.
> > >
> > >
> > >
> > > Colin
> > >
> > >  --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@>
wrote:
> > > >
> > > > >  I have tested your sample program with 16f877 and 18f4520. Both work,
but with my Kingston 1GB card I need a small delay of about 10ms between the
write and read parts of the program. Presumably this is to allow time for the
card to do its internal housekeeping? Without this delay, the program hangs
after the "write to sector" part.
> > > >
> > > > Do you have any documentation on this 10ms delay? I did not see anything
about this in the datasheet and I have had no issues.
> > > >
> > > > If this is true, you can add a 10ms delay after line 271 (for write
sector), and after line 209 (for read sector) within the lib file.
> > > >
> > > > This lib is not compatible with Bert's book, although you may be able to
do some modifications. I suggest you give jallib a try, here is some
documentation that will help you:
> > > >
> > > > http://justanotherlanguage.org/content/tutorial_getting_started
> > > > http://justanotherlanguage.org/content/tutorial_blink_a_led
> > > >
> > > > I will send you my fat32 lib + sample.
> > > >
> > > > Matt.
> > > >
> > >
> >
>

#27415 From: "colin.tallis" <colin.tallis@...>
Date: Sat Nov 14, 2009 9:43 am
Subject: Re: sd card reading
colin.tallis
Offline Offline
Send Email Send Email
 
Hi Matt

I added the delay where you suggested but this did not appear to work.
However, if I place the delay in the sd_stop_write() procedure, it does work.
Tested on a 1GB Kingston and a 512MB unbranded card.

Colin

procedure sd_stop_write() is
   spi_master_hw = 0xFD -- send "stop transmission token"
   sd_set_idle()
   delay_1ms(10) -- add delay here
end procedure


--- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@...> wrote:
>
> Colin, I believe the correct way is to ask the SD card when it is ready after
writing, and I do this in the lib as specified by the datasheet. It is possible
that it may not be working correctly. Please add the 10ms delay in the lib where
I specified and let me know if it works for you, I will add it to the lib untill
I find a proper solution.
>
>
> I will get you guys a copy of my fat32 lib, hopefully this week. It also works
on hard disks with pata_hard_disk lib.
>
> Enzo.
> As for data logging, the FAT32 lib does not create files, so in order to write
to a specific file it will have to work like this:
>
> 1. use your PC to copy a large blank/junk file onto your sd card (this will
allocated some space for you to read/write to)
> 2. put your sd card in your circuit, hook it up to your serial port, turn it
on, you will get a directory listing
> 3. browse directories/files by sending the file number via serial port.
> 4. use fat32_file_open procedure to open a file
> 5. start writing. If you sent a 10mb blank file before, you will have 10mb to
write to.
>
> In the future, I will try to add something for creating files.
>
> Matt.
>
>
> --- In jallist@yahoogroups.com, "colin.tallis" <colin.tallis@> wrote:
> >
> >
> > Hi Matt,
> >
> > No documentation, but I have read on other forums that there needs to be a
wait period after sector write in order for the card to complete the internal
insructions. The delay may be different for your cards but it is a must for
mine. The delay is only required after write not read.
> >
> >
> >
> > Colin
> >
> >  --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@> wrote:
> > >
> > > >  I have tested your sample program with 16f877 and 18f4520. Both work,
but with my Kingston 1GB card I need a small delay of about 10ms between the
write and read parts of the program. Presumably this is to allow time for the
card to do its internal housekeeping? Without this delay, the program hangs
after the "write to sector" part.
> > >
> > > Do you have any documentation on this 10ms delay? I did not see anything
about this in the datasheet and I have had no issues.
> > >
> > > If this is true, you can add a 10ms delay after line 271 (for write
sector), and after line 209 (for read sector) within the lib file.
> > >
> > > This lib is not compatible with Bert's book, although you may be able to
do some modifications. I suggest you give jallib a try, here is some
documentation that will help you:
> > >
> > > http://justanotherlanguage.org/content/tutorial_getting_started
> > > http://justanotherlanguage.org/content/tutorial_blink_a_led
> > >
> > > I will send you my fat32 lib + sample.
> > >
> > > Matt.
> > >
> >
>

#27414 From: "matthewschinkel" <matthewschinkel@...>
Date: Fri Nov 13, 2009 10:01 pm
Subject: Re: sd card reading
matthewschinkel
Offline Offline
Send Email Send Email
 
Colin, I believe the correct way is to ask the SD card when it is ready after
writing, and I do this in the lib as specified by the datasheet. It is possible
that it may not be working correctly. Please add the 10ms delay in the lib where
I specified and let me know if it works for you, I will add it to the lib untill
I find a proper solution.


I will get you guys a copy of my fat32 lib, hopefully this week. It also works
on hard disks with pata_hard_disk lib.

Enzo.
As for data logging, the FAT32 lib does not create files, so in order to write
to a specific file it will have to work like this:

1. use your PC to copy a large blank/junk file onto your sd card (this will
allocated some space for you to read/write to)
2. put your sd card in your circuit, hook it up to your serial port, turn it on,
you will get a directory listing
3. browse directories/files by sending the file number via serial port.
4. use fat32_file_open procedure to open a file
5. start writing. If you sent a 10mb blank file before, you will have 10mb to
write to.

In the future, I will try to add something for creating files.

Matt.


--- In jallist@yahoogroups.com, "colin.tallis" <colin.tallis@...> wrote:
>
>
> Hi Matt,
>
> No documentation, but I have read on other forums that there needs to be a
wait period after sector write in order for the card to complete the internal
insructions. The delay may be different for your cards but it is a must for
mine. The delay is only required after write not read.
>
>
>
> Colin
>
>  --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@> wrote:
> >
> > >  I have tested your sample program with 16f877 and 18f4520. Both work, but
with my Kingston 1GB card I need a small delay of about 10ms between the write
and read parts of the program. Presumably this is to allow time for the card to
do its internal housekeeping? Without this delay, the program hangs after the
"write to sector" part.
> >
> > Do you have any documentation on this 10ms delay? I did not see anything
about this in the datasheet and I have had no issues.
> >
> > If this is true, you can add a 10ms delay after line 271 (for write sector),
and after line 209 (for read sector) within the lib file.
> >
> > This lib is not compatible with Bert's book, although you may be able to do
some modifications. I suggest you give jallib a try, here is some documentation
that will help you:
> >
> > http://justanotherlanguage.org/content/tutorial_getting_started
> > http://justanotherlanguage.org/content/tutorial_blink_a_led
> >
> > I will send you my fat32 lib + sample.
> >
> > Matt.
> >
>

#27413 From: "colin.tallis" <colin.tallis@...>
Date: Fri Nov 13, 2009 7:14 pm
Subject: Re: sd card reading
colin.tallis
Offline Offline
Send Email Send Email
 
Hi Matt,

No documentation, but I have read on other forums that there needs to be a wait
period after sector write in order for the card to complete the internal
insructions. The delay may be different for your cards but it is a must for
mine. The delay is only required after write not read.



Colin

  --- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@...> wrote:
>
> >  I have tested your sample program with 16f877 and 18f4520. Both work, but
with my Kingston 1GB card I need a small delay of about 10ms between the write
and read parts of the program. Presumably this is to allow time for the card to
do its internal housekeeping? Without this delay, the program hangs after the
"write to sector" part.
>
> Do you have any documentation on this 10ms delay? I did not see anything about
this in the datasheet and I have had no issues.
>
> If this is true, you can add a 10ms delay after line 271 (for write sector),
and after line 209 (for read sector) within the lib file.
>
> This lib is not compatible with Bert's book, although you may be able to do
some modifications. I suggest you give jallib a try, here is some documentation
that will help you:
>
> http://justanotherlanguage.org/content/tutorial_getting_started
> http://justanotherlanguage.org/content/tutorial_blink_a_led
>
> I will send you my fat32 lib + sample.
>
> Matt.
>

#27412 From: "enzo_serafini" <enzo.serafini@...>
Date: Fri Nov 13, 2009 6:22 pm
Subject: Re: sd card reading
enzo_serafini
Offline Offline
Send Email Send Email
 
Hello Matt,

I'm interested by your fat32 lib and sample, I would like to make a data-logger
with storage on a sd-card.

thank you,

Enzo


--- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@...> wrote:
>
> >  I have tested your sample program with 16f877 and 18f4520. Both work, but
with my Kingston 1GB card I need a small delay of about 10ms between the write
and read parts of the program. Presumably this is to allow time for the card to
do its internal housekeeping? Without this delay, the program hangs after the
"write to sector" part.
>
> Do you have any documentation on this 10ms delay? I did not see anything about
this in the datasheet and I have had no issues.
>
> If this is true, you can add a 10ms delay after line 271 (for write sector),
and after line 209 (for read sector) within the lib file.
>
> This lib is not compatible with Bert's book, although you may be able to do
some modifications. I suggest you give jallib a try, here is some documentation
that will help you:
>
> http://justanotherlanguage.org/content/tutorial_getting_started
> http://justanotherlanguage.org/content/tutorial_blink_a_led
>
> I will send you my fat32 lib + sample.
>
> Matt.
>

#27411 From: "matthewschinkel" <matthewschinkel@...>
Date: Fri Nov 13, 2009 6:06 pm
Subject: Re: sd card reading
matthewschinkel
Offline Offline
Send Email Send Email
 
>  I have tested your sample program with 16f877 and 18f4520. Both work, but
with my Kingston 1GB card I need a small delay of about 10ms between the write
and read parts of the program. Presumably this is to allow time for the card to
do its internal housekeeping? Without this delay, the program hangs after the
"write to sector" part.

Do you have any documentation on this 10ms delay? I did not see anything about
this in the datasheet and I have had no issues.

If this is true, you can add a 10ms delay after line 271 (for write sector), and
after line 209 (for read sector) within the lib file.

This lib is not compatible with Bert's book, although you may be able to do some
modifications. I suggest you give jallib a try, here is some documentation that
will help you:

http://justanotherlanguage.org/content/tutorial_getting_started
http://justanotherlanguage.org/content/tutorial_blink_a_led

I will send you my fat32 lib + sample.

Matt.

#27410 From: "colin.tallis" <colin.tallis@...>
Date: Fri Nov 13, 2009 4:42 pm
Subject: Re: sd card reading
colin.tallis
Offline Offline
Send Email Send Email
 
Nice library Matt!

  I have tested your sample program with 16f877 and 18f4520. Both work, but with
my Kingston 1GB card I need a small delay of about 10ms between the write and
read parts of the program. Presumably this is to allow time for the card to do
its internal housekeeping? Without this delay, the program hangs after the
"write to sector" part.

Also - it only compiles with the latest jal compiler ver.24l otherwise it
reports an error on ALIAS.

I await your FAT library with interest.


cheers

Colin

--- In jallist@yahoogroups.com, "matthewschinkel" <matthewschinkel@...> wrote:
>
> Hey Hans, nice to hear from you.
>
> Yes, I have created a SD CARD lib and have released it with jallib. It can be
downloaded in the jallib-pack-bee at:
>
> http://code.google.com/p/jallib/downloads/list
>
> There is a lib and a sample for 16f877 & 18f452. I will make a tutorial and
put it on justanotherlanguage.org ASAP for you.
>
> I also have an impressive fat32 lib, but I have not released it yet. It is
however too large for 16f877. Let me know if you need it, you will need a 18F
PIC. It supports fragmented files so you do not need to defrag your sd card
before use. You can easily browse files & folders and read files. It also
supports long file names.
>
> Matt.
>
>
>
> --- In jallist@yahoogroups.com, "van Veldhuizen" <hanzeman@> wrote:
> >
> > Hello Matthew,
> > I did not spent time for the sd card reading for the past months, because
the whole affaire is a bit complicated for me. Have you made any progres in
making a Jallib.
> > Please let me know,
> > Thanks
> > Hans
> >   ----- Original Message -----
> >   From: matthewschinkel
> >   To: jallist@yahoogroups.com
> >   Sent: Saturday, July 11, 2009 2:18 AM
> >   Subject: [jallist] (unknown)
> >
> >
> >
> >
> >
> >   Hans, SD Card reading may be useful for me in the future. I would also
like to set up a sd ciruit to test fat32.
> >
> >   I would like to start a FAT32 lib that will work on both SD cards and IDE
hard drives.
> >
> >   I saw your code, but i need lcd_44780_H from you and possibly a new copy
of your code.
> >
> >   I was also wondering if you are planning on making a lib to be included in
jallib releases?
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>

#27409 From: "van Veldhuizen" <hanzeman@...>
Date: Fri Nov 13, 2009 12:08 pm
Subject: Re: Re: sd card reading
hansvanveldh...
Offline Offline
Send Email Send Email
 
Hey Matt,
Nice to get such a fast answer. I am still a Bert's book student and by the
translation i have tried (frm teh german site) I ran into my shortage of
knowledge and experience.
Two questions, what name do I have to look for and is your lib suitable in
Bert's environment.?
Thanks
Hans

   ----- Original Message -----
   From: matthewschinkel
   To: jallist@yahoogroups.com
   Sent: Friday, November 13, 2009 9:15 AM
   Subject: [jallist] Re: sd card reading



   Hey Hans, nice to hear from you.

   Yes, I have created a SD CARD lib and have released it with jallib. It can be
downloaded in the jallib-pack-bee at:

   http://code.google.com/p/jallib/downloads/list

   There is a lib and a sample for 16f877 & 18f452. I will make a tutorial and
put it on justanotherlanguage.org ASAP for you.

   I also have an impressive fat32 lib, but I have not released it yet. It is
however too large for 16f877. Let me know if you need it, you will need a 18F
PIC. It supports fragmented files so you do not need to defrag your sd card
before use. You can easily browse files & folders and read files. It also
supports long file names.

   Matt.

   --- In jallist@yahoogroups.com, "van Veldhuizen" <hanzeman@...> wrote:
   >
   > Hello Matthew,
   > I did not spent time for the sd card reading for the past months, because
the whole affaire is a bit complicated for me. Have you made any progres in
making a Jallib.
   > Please let me know,
   > Thanks
   > Hans
   > ----- Original Message -----
   > From: matthewschinkel
   > To: jallist@yahoogroups.com
   > Sent: Saturday, July 11, 2009 2:18 AM
   > Subject: [jallist] (unknown)
   >
   >
   >
   >
   >
   > Hans, SD Card reading may be useful for me in the future. I would also like
to set up a sd ciruit to test fat32.
   >
   > I would like to start a FAT32 lib that will work on both SD cards and IDE
hard drives.
   >
   > I saw your code, but i need lcd_44780_H from you and possibly a new copy of
your code.
   >
   > I was also wondering if you are planning on making a lib to be included in
jallib releases?
   >
   >
   >
   >
   >
   > [Non-text portions of this message have been removed]
   >





[Non-text portions of this message have been removed]

#27408 From: "matthewschinkel" <matthewschinkel@...>
Date: Fri Nov 13, 2009 8:15 am
Subject: Re: sd card reading
matthewschinkel
Offline Offline
Send Email Send Email
 
Hey Hans, nice to hear from you.

Yes, I have created a SD CARD lib and have released it with jallib. It can be
downloaded in the jallib-pack-bee at:

http://code.google.com/p/jallib/downloads/list

There is a lib and a sample for 16f877 & 18f452. I will make a tutorial and put
it on justanotherlanguage.org ASAP for you.

I also have an impressive fat32 lib, but I have not released it yet. It is
however too large for 16f877. Let me know if you need it, you will need a 18F
PIC. It supports fragmented files so you do not need to defrag your sd card
before use. You can easily browse files & folders and read files. It also
supports long file names.

Matt.



--- In jallist@yahoogroups.com, "van Veldhuizen" <hanzeman@...> wrote:
>
> Hello Matthew,
> I did not spent time for the sd card reading for the past months, because the
whole affaire is a bit complicated for me. Have you made any progres in making a
Jallib.
> Please let me know,
> Thanks
> Hans
>   ----- Original Message -----
>   From: matthewschinkel
>   To: jallist@yahoogroups.com
>   Sent: Saturday, July 11, 2009 2:18 AM
>   Subject: [jallist] (unknown)
>
>
>
>
>
>   Hans, SD Card reading may be useful for me in the future. I would also like
to set up a sd ciruit to test fat32.
>
>   I would like to start a FAT32 lib that will work on both SD cards and IDE
hard drives.
>
>   I saw your code, but i need lcd_44780_H from you and possibly a new copy of
your code.
>
>   I was also wondering if you are planning on making a lib to be included in
jallib releases?
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

#27407 From: "van Veldhuizen" <hanzeman@...>
Date: Fri Nov 13, 2009 7:54 am
Subject: sd card reading
hansvanveldh...
Offline Offline
Send Email Send Email
 
Hello Matthew,
I did not spent time for the sd card reading for the past months, because the
whole affaire is a bit complicated for me. Have you made any progres in making a
Jallib.
Please let me know,
Thanks
Hans
   ----- Original Message -----
   From: matthewschinkel
   To: jallist@yahoogroups.com
   Sent: Saturday, July 11, 2009 2:18 AM
   Subject: [jallist] (unknown)





   Hans, SD Card reading may be useful for me in the future. I would also like to
set up a sd ciruit to test fat32.

   I would like to start a FAT32 lib that will work on both SD cards and IDE hard
drives.

   I saw your code, but i need lcd_44780_H from you and possibly a new copy of
your code.

   I was also wondering if you are planning on making a lib to be included in
jallib releases?





[Non-text portions of this message have been removed]

#27406 From: "matthewschinkel" <matthewschinkel@...>
Date: Fri Nov 13, 2009 2:04 am
Subject: Re: 18F4550 - pragma eedata
matthewschinkel
Offline Offline
Send Email Send Email
 
Hey guys, I too have an issue with 18F4550, I recently ordered 3 of these chips
but then found that they would not program correctly. I am using a K149-BC
programmer.

When I program it it says there is an error when verifying the data.

When I read the chip somehow eeprom 0x0000 has a value of 0x9E while all others
are 0xFF as they should be.

Of course blink a led does not work for me on this PIC

Matt.



--- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
>
>
> Mihai Rainer wrote:
>
> > Another problem I found with jallib and 18F4550.
> > using pragma eedata it generates org 0x0000 in EEPROM data
> > section. And the eeprom data is not loaded corectly by
> > MPLAB and PICKit.
> >
> > Any instruction to correct this?
>
> Looks like an issue with the compiler. The device file for the 18f4550
> specifies the location and size of EEPROM memory correctly with: pragma
> eeprom, but the compiler seems to ignore it (at least for the 18Fs).
>
> So probably Kyle may be the only person who can help.
>
> Regards, Rob.
>
>
> --
> Rob Hamerling, Vianen, NL (http://www.robh.nl/)
>

#27405 From: Patrick Froucht <p.froucht@...>
Date: Thu Nov 12, 2009 5:28 am
Subject: Re: Wisp 648 on OSX, differences between Tiger and Leopard?
multitrain2000
Offline Offline
Send Email Send Email
 
Hello Eur,

If I read correctly, trouble are with laptop.

With the old one and it's RS232 interface, perhaps it's a problem of the
voltage value for the RS232 signals. With the standard, output voltage
should be +/- 15V.
Some computers give +/- 7V and other barely reach the negative range.
And if its at the limit of the voltage sense for the interface circuit
you can get random successes.

For newer computers with USB interface, Wouter says for Wisp648 "serial
interface, also works with off-the-shelve usb-to-serial converters"
There is also some question: Wouter did not tested it with all the
converters and feed the computer USB interface enough power to drive the
converter? Sometime the USB power can be adjusted to save battery.

Patrick

Eur van Andel a écrit :
>
> Hi
>
> I've programmed PIC for years, mostly with the Wisp628 and Windoze
> 98, but also under FreeBSD. This worked 99.9% of the time. When it
> didn't work, the cause was things like:
>
> impatiently switching on the LCD backlight or other large current
> drawing peripherals (while programming)
> a 230V AC cable acros the board which is switching an inductive load
>
> and other nasty EMF-generating events.
>
> Recently, I switched to a Wisp648 and ran that with a FTDI-based USB-
> to-serial converter from Mac OS X 10.4, a.k.a. Tiger. Experience same
> as above, with no EMF the success rate is above 99.8%.
>
> Recently, I had to program some PICs in the field, so I snatched my
> wifes MacBookPro (Leopard, 10.5) and installed the same drivers for
> the USB-serial-cable. Succes rate: 10%! There was no difference
> between Wisp648 and Wisp628.
>
> I then tried an old XP laptop and used the serial port. Success rate:
> 30%. Still not good enough.
>
> I then tried the serial-to-usb cable on the XP laptop. This worked
> reasonably: 95% of the time.
>
> This is the *same* cable with the *same* xwisp.py Python script and
> the *same* wisp648 programmer. I switched back and forth between
> laptop and MBP and the results were the same every time (10% vs
> 95%). My G5 (Tiger, 10.4) had no problem.
>
> So it can't be the cable, it can't be the xwisp script, it can't be
> the programmer?
>
> I can't believe the OS matters that much for serial or USB
> communication?
>
> ---
> ir EE van Andel eur@... <mailto:eur%40fiwihex.nl>
> http://www.fiwihex.nl <http://www.fiwihex.nl>
> Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
> tel+31-546-491106 fax+31-546-491107
>
> [Non-text portions of this message have been removed]
>
>

#27404 From: Eur van Andel <eur@...>
Date: Wed Nov 11, 2009 11:11 pm
Subject: Wisp 648 on OSX, differences between Tiger and Leopard?
eur_1965
Offline Offline
Send Email Send Email
 
Hi

I've programmed PIC for years, mostly with the Wisp628 and Windoze
98, but also under FreeBSD. This worked 99.9% of the time. When it
didn't work, the cause was things like:

impatiently switching on the LCD backlight or other large current
drawing peripherals (while programming)
a 230V AC cable acros the board which is switching an inductive load

and other nasty EMF-generating events.

Recently, I switched to a Wisp648 and ran that with a FTDI-based USB-
to-serial converter from Mac OS X 10.4, a.k.a. Tiger. Experience same
as above, with no EMF the success rate is above 99.8%.

Recently, I had to program some PICs in the field, so I snatched my
wifes MacBookPro (Leopard, 10.5) and installed the same drivers for
the USB-serial-cable. Succes rate: 10%!  There was no difference
between Wisp648 and Wisp628.

I then tried an old XP laptop and used the serial port. Success rate:
30%. Still not good enough.

I then tried the serial-to-usb cable on the XP laptop. This worked
reasonably: 95% of the time.

This is the *same* cable with the *same* xwisp.py Python script and
the *same* wisp648 programmer. I switched back and forth between
laptop and MBP and the results were the same every time  (10% vs
95%). My G5 (Tiger, 10.4) had no problem.

So it can't be the cable, it can't be the xwisp script, it can't be
the programmer?

I can't believe the OS matters that much for serial or USB
communication?



---
ir EE van Andel eur@...  http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107




[Non-text portions of this message have been removed]

#27403 From: Rob Hamerling <robhamerling@...>
Date: Wed Nov 11, 2009 4:49 pm
Subject: Re: 18F4550 - pragma eedata
digithalys
Offline Offline
Send Email Send Email
 
Mihai Rainer wrote:

> Another problem I found with jallib and 18F4550.
> using pragma eedata it generates org 0x0000 in EEPROM data
> section. And the eeprom data is not loaded corectly by
> MPLAB and PICKit.
>
> Any instruction to correct this?

Looks like an issue with the compiler. The device file for the 18f4550
specifies the location and size of EEPROM memory correctly with: pragma
eeprom, but the compiler seems to ignore it (at least for the 18Fs).

So probably Kyle may be the only person who can help.

Regards, Rob.


--
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

#27402 From: Mihai Rainer <mihai@...>
Date: Wed Nov 11, 2009 4:11 pm
Subject: 18F4550 - pragma eedata
mishulentzi
Offline Offline
Send Email Send Email
 
Hello,

Another problem I found with jallib and 18F4550.
using pragma eedata it generates org 0x0000 in EEPROM data
section. And the eeprom data is not loaded corectly by
MPLAB and PICKit.

Any instruction to correct this?

Thank you very much.
Best regars,
Mihai

#27401 From: "alancool_design" <alancool_design@...>
Date: Wed Nov 11, 2009 2:06 pm
Subject: Re: 16f84
alancool_design
Offline Offline
Send Email Send Email
 
--- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
>
>
> Hi Alan(?),
>
> alancool_design wrote:
> > i know this is device is as old as the hills, but i am new to
> > microcontrollers and i just happen to have a small handful of them. I
> >  need to download 16f84_04.jal and the standard jlib.jal as i am
> > trying to use this device for learning and basic experimenting
> > purposes. I can find plenty of reference to 16f84_04 and jlib, but i
> > simply cannot find where to download them, its as if i am expected to
> >  already have them. i am working from Bert Van Dam's book and the
> > files downloaded but i note there is no 16f84_bert file. I hav looked
> > at loads of sites to no avail.
>
> The Jallib group has a set of files that is similar but not
> compatible with Bert's libs. Depending of your experience you might use
> that set or convert the 16f84.jal file to Bert's environment.
>
> > Ps. i would actually like to understand how to create these files as
> > i think this may be more useful for the long term.
>
> That won't be necessary. you are not the first with that idea! Have a
> look at http://www.robh.nl or http://jallib.googlecode.com and you'll
> find lots of device files. Also
> http://www.justanotherlanguage.org might be useful to you.
>
> Regards, Rob.
>
> --
> Rob Hamerling, Vianen, NL (http://www.robh.nl/)
>
Thanks for the pointers i will see how i get on, inexperience to date is however
high.
Alan

#27400 From: Rob Hamerling <robhamerling@...>
Date: Tue Nov 10, 2009 9:20 pm
Subject: Re: 16f84
digithalys
Offline Offline
Send Email Send Email
 
Hi Alan(?),

alancool_design wrote:
> i know this is device is as old as the hills, but i am new to
> microcontrollers and i just happen to have a small handful of them. I
>  need to download 16f84_04.jal and the standard jlib.jal as i am
> trying to use this device for learning and basic experimenting
> purposes. I can find plenty of reference to 16f84_04 and jlib, but i
> simply cannot find where to download them, its as if i am expected to
>  already have them. i am working from Bert Van Dam's book and the
> files downloaded but i note there is no 16f84_bert file. I hav looked
> at loads of sites to no avail.

The Jallib group has a set of files that is similar but not
compatible with Bert's libs. Depending of your experience you might use
that set or convert the 16f84.jal file to Bert's environment.

> Ps. i would actually like to understand how to create these files as
> i think this may be more useful for the long term.

That won't be necessary. you are not the first with that idea! Have a
look at http://www.robh.nl or http://jallib.googlecode.com and you'll
find lots of device files. Also
http://www.justanotherlanguage.org might be useful to you.

Regards, Rob.

--
Rob Hamerling, Vianen, NL (http://www.robh.nl/)

#27399 From: "alancool_design" <alancool_design@...>
Date: Tue Nov 10, 2009 9:01 pm
Subject: 16f84
alancool_design
Offline Offline
Send Email Send Email
 
i know this is device is as old as the hills, but i am new to microcontrollers
and i just happen to have a small handful of them. I need to download
16f84_04.jal and the standard jlib.jal as i am trying to use this device for
learning and basic experimenting purposes. I can find plenty of reference to
16f84_04 and jlib, but i simply cannot find where to download them, its as if i
am expected to already have them.
i am working from Bert Van Dam's book and the files downloaded but i note there
is no 16f84_bert file. I hav looked at loads of sites to no avail.
Ps. i would actually like to understand how to create these files as i think
this may be more useful for the long term.

thanks to anyone who can assist in this seemingly simple matter.

#27398 From: "Miroslav" <ok2fug@...>
Date: Tue Nov 10, 2009 4:42 pm
Subject: Program or library in JAL to control an AD9951 DDS
mkondelka
Offline Offline
Send Email Send Email
 
Hi,

i search library or program to control DDS Analog Devices. Does anyone have?

Thanks.

#27397 From: "Bert van Dam" <bymco.bv@...>
Date: Mon Nov 9, 2009 7:41 pm
Subject: Re: I2C Problems
bertloopvogel
Offline Offline
Send Email Send Email
 
>Hi there, I am new within the Jal group, I want to use Jal to make a
>aquarium controller. I want to use the I2C library, but when a run the
>program, the processor hangs. With my electronic scope I do not see any
>activity (SDA/SCL Lines). I adjusted the ICP library to the correct pins
>(RE1/RE2)

Hi Riekus,

1. e1 and e2 are analog pins, did you remember to switch them to digital?
2. Since these are not the hardware i2c pins you need to use the software
i2c library which is i2c_sw in the starterpack

Have fun,
Bert


www.vandam.tk

#27396 From: "Riekus" <riekusbennink@...>
Date: Mon Nov 9, 2009 7:27 pm
Subject: I2C Problems
riekusbennink
Offline Offline
Send Email Send Email
 
Hi there, I am new within the Jal group, I want to use Jal to make a aquarium
controller. I want to use the I2C library, but when a run the program, the
processor hangs. With my electronic scope I do not see any activity (SDA/SCL
Lines). I adjusted the ICP library to the correct pins (RE1/RE2) The counter on
my display stops. when I comment out de line which invokes the I2C library and
run the program again the counter is displayed on de LCD.
The code that use to test the I2C library is:

include  16f877_bert
include i2c
include  lcd_44780_riekus

var byte Counter = 0
var byte Hulp  = 0

lcd_clear_line(0)
forever loop
    Counter = 0
    for 64 loop
      delay_1s(1)
      i2c_write_2(7,0b_1111_0001, counter
      counter = counter +1
      lcd_num_pos (counter,0)
   end  loop

end  loop

#27395 From: "Vasile" <vsurducan@...>
Date: Sun Nov 8, 2009 5:03 pm
Subject: Re: rtc_isr_tmr0 / 4 Mhz problem
vsurducan
Offline Offline
Send Email Send Email
 
Hi Rob,

I guess so far you have right. With jal024l and 1omS timing generated with the
code in discussion, the lenght of the ISR looks it does not affect the timing
precision. However, it happens to me several times before, so still have doubts
is 100% correct.

best wishes,
Vasile

--- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@...> wrote:
>
>
> Hi Vasile,
>
> No doubt you have a lot of experience with PICs and Jal, and you are
> right that the processing time of the interrupt service routine must be
> (significantly) less than the time between two interrupts to allow for
> the main routine to do some useful work. If the ISR takes too many
> cycles the program simply doesn't work.
> That is not the case for this clock with a 4 MHz oscillator, but your
> remark in a previous message suggested that the length of the ISR would
> be of influence on the precision of this clock. I'm convinced it is not,
> but if you think otherwise, I'm listening to your explanation (and keep
> it to the subject of this conversation).
>
> Regards, Rob.
>
>
> Vasile wrote:
>
> > I've used this stuff many times, starting from 2001 with both jal04
> > and jalV2, calling jal routines from the ISR or calling assembler
> > routines within ISR, it's not new for me see this old stuff:
> > http://www.geocities.com/vsurducan/electro/PIC/newclk.txt The lenght
> > of the assembler for non interrupt driven, zero error algorithm is
> > very important. For the interrupt version, the lenght of the ISR is
> > also important when need zero error short timing. Try generate 1mS or
> > 100uS using this methode, measure it with a scope  and see if you can
> > do it with a huge interrupt routine.
> >
> > best wishes, Vasile
> >
> > --- In jallist@yahoogroups.com, Rob Hamerling <robhamerling@>
> > wrote:
> >>
> >> Hi Vasile,
> >>
> >> Vasile wrote:
> >>
> >>> However, the lenght of the code in the ISR area is critical, so
> >>> written a pure jal interrupt routine may give you some errors.
> >> I don't think so! Did you read the 'theory' behind the way the RTC
> >> library works? See also the site of Roman Black
> >> http://www.romanblack.com/one_sec.htm If you (still) think the
> >> length of the interrupt routine is of influence, please explain.
> >>
> >> Regards, Rob.
> >>
> >>
> >> -- Rob Hamerling, Vianen, NL (http://www.robh.nl/)
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
> --
> Rob Hamerling, Vianen, NL (http://www.robh.nl/)
>

Messages 27395 - 27424 of 27583   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help